
-----------------------------------
Tony
Mon Dec 08, 2003 7:31 pm

[tutorial] compiling source code into .exe file
-----------------------------------
wow :shock: never though this could count as a tutorial, but apparently I came across this question posted more then once :roll: So here it is.

First of all - make sure you have ether WinOOT 3.x series or the latest version of v4. If you have WinOOT v4.0 you cannon compile, because it is not a full version of the IDE :roll: Go to http://www.compsci.ca/bbs/files/exe1.gif

I'm talking about THAT run menu item :D Click it.

Now a bunch of options come up:
http://www.compsci.ca/bbs/files/exe2.gif

You want the "Generate stand-alone program" item.

That brings up yet another menu :lol:
http://www.compsci.ca/bbs/files/exe3.gif

Those are just some options your program can have while running.

Clicking "ok" will compile your hello world program into a 600kb executable file :lol:

-----------------------------------
Dan
Tue Dec 09, 2003 3:06 pm


-----------------------------------
it should be noted that verson 3.x has MANY bugs when compiling espalty when using lessused modulages like sprites, GUI and some of the wired inputs (NET, ect). some times restarting truing then trying to complie b4 you do anything other then load the file will wrok. Also i have found that the compiled verson of progames in turing some times  do not run like the verson that is run in turing, epstlay with colors, fonts and perofmance (speed).

-----------------------------------
Omicron91
Mon Dec 20, 2004 5:18 pm


-----------------------------------
Do you have to have Turing installed on a computer to run the .exe?

-----------------------------------
rdrake
Mon Dec 20, 2004 5:59 pm


-----------------------------------
Do you have to have Turing installed on a computer to run the .exe?Nope, it works without it.

-----------------------------------
Jonny Tight Lips
Thu Dec 23, 2004 7:32 pm


-----------------------------------
What happenes if you have more then one turing file. Like you have an include or import for example. What would happen? Would you stil nee to have all the other files and pictures and crap for it to run and would those files also become exe or would they stay as .tu?

-----------------------------------
Andy
Thu Dec 23, 2004 10:02 pm


-----------------------------------
i think they include it all in the exe yea im pretty sure they do.. thats y turing is so crap

-----------------------------------
Tony
Thu Dec 23, 2004 11:07 pm


-----------------------------------
only the code is compiled (though all of it). You still have to include all of your image and data files separatly.

-----------------------------------
[Gandalf]
Thu Jan 13, 2005 6:39 pm


-----------------------------------
When I used to use my old, Turing (original) stand alone compiler - the .exe's were around 100kb, and now they are nearing 1mb... Does anyone have an explanation for this?  I can understand an increase in size (music, gui?, etc.) but it makes it really painful to have a 720kb "hello world" program...

-----------------------------------
Mazer
Thu Jan 13, 2005 7:52 pm


-----------------------------------
It is painful. But, it is Turing. Sorry, there isn't any logical explanation I can offer. I tried removing all of the predefs and compiling a simple program (that is, a single commented line) and it did nothing to lower the size noticeably.

-----------------------------------
Drakain Zeil
Sun Jan 16, 2005 5:39 pm


-----------------------------------
Where do I get this? The version my teacher gave me gives me an alertbox about it not being able to make an exe yet.

-----------------------------------
Bacchus
Sun Jan 16, 2005 7:45 pm


-----------------------------------
did it say something like a missing end if or end for? pretty sure it would just be syntax

-----------------------------------
[Gandalf]
Sun Jan 16, 2005 10:33 pm


-----------------------------------
versions before 4.04 or something dont have the compiler built in them so you will get an error message.  You will need one of the old compilers to compile (if you need to).

-----------------------------------
Shyfire
Fri Apr 08, 2005 10:13 am

size of files
-----------------------------------
ya turings size of the .exes is a pain. so i use a .exe compressor
thats the only way iv found around it

-----------------------------------
[Gandalf]
Mon May 09, 2005 12:56 am


-----------------------------------
What is a good .exe compressor?  And how does it compress the executable?

-----------------------------------
Shyfire
Mon May 09, 2005 3:45 pm

well.......
-----------------------------------
1: cexeGui is what i use
2: it works something like winzip but still keeps your .exe playable with out unzipping.

-----------------------------------
[Gandalf]
Mon May 09, 2005 11:54 pm


-----------------------------------
trojan detected, biotch... :roll: 

I tried a bunch of other ones, but they seem to not work with Turing .exe's...

-----------------------------------
Shyfire
Tue May 10, 2005 1:16 pm


-----------------------------------
well thanks for the compliment smart @$$
i didn't get a trojan so hahahahahhahha(evil laugh) 
**thinks to him self** i am all mighty

-----------------------------------
[Gandalf]
Wed May 11, 2005 12:02 am


-----------------------------------
Just joking... geeze...  I thought you might have told me to get some random virus, and anyways - it informs everyone else to be wary in downloading it from where.

Too bad the other ones I got don't work with Turing executables :(.

-----------------------------------
Hikaru79
Wed May 11, 2005 6:14 am


-----------------------------------
It is painful. But, it is Turing. Sorry, there isn't any logical explanation I can offer. I tried removing all of the predefs and compiling a simple program (that is, a single commented line) and it did nothing to lower the size noticeably.

The reason, to the best of my knowledge, is that the Turing "compiler" doesn't selectively pick and choose what parts of the Turing standard library to compile -- it just throws it all in. That's why you never need an import line or anything when you're using Net.Connect or Pic.ScreenLoad -- Net and Pic and every other module in the library simply gets compiled in regardless of whether you need it or not. So that's the reason why your "Hello World" one line program is like 300 Kb. It's because Turing can't tell that it doesn't need every single piece of the library. :(

-----------------------------------
Shyfire
Wed May 11, 2005 10:54 am


-----------------------------------
srry dude i was in a bad mood and that was just the iceing on the cake 
**so to speak**

-----------------------------------
neufelni
Fri May 13, 2005 7:30 am


-----------------------------------
I have tried doing this several times but it is not allowing me to open the exe file. It gives me this message : 

Bad object file header in "filename".(2)

Do you guys no why it is doing this?

-----------------------------------
Shyfire
Fri May 13, 2005 10:30 am


-----------------------------------
no clue 

*did u use a compressor if so it could have been a crappy one if not the i dont know

-----------------------------------
[Gandalf]
Fri May 13, 2005 3:07 pm


-----------------------------------
Hmm, the error I get is:
Unable to read object file "filename".(1) 

Seems pretty similar...  I dont know, the two compressors I tried are:

Mew 11 SE v1.2
upx125w

These two are pretty popular on the charts I looked at, and they worked on non-turing exe's...

-----------------------------------
theguru
Sat Oct 08, 2005 4:52 pm


-----------------------------------
It is painful. But, it is Turing. Sorry, there isn't any logical explanation I can offer. I tried removing all of the predefs and compiling a simple program (that is, a single commented line) and it did nothing to lower the size noticeably.

The reason, to the best of my knowledge, is that the Turing "compiler" doesn't selectively pick and choose what parts of the Turing standard library to compile -- it just throws it all in. That's why you never need an import line or anything when you're using Net.Connect or Pic.ScreenLoad -- Net and Pic and every other module in the library simply gets compiled in regardless of whether you need it or not. So that's the reason why your "Hello World" one line program is like 300 Kb. It's because Turing can't tell that it doesn't need every single piece of the library. :(

that's why i prefer c++ but it's great that you can actually compile it.

-----------------------------------
tianxiao
Fri Jan 23, 2009 2:03 pm

Re: [tutorial] compiling source code into .exe file
-----------------------------------
for some reason after i compile it i tried to open it it says bad object file header in "Program's name.exe" (2)

-----------------------------------
Insectoid
Fri Jan 23, 2009 2:10 pm

RE:[tutorial] compiling source code into .exe file
-----------------------------------
Turing 4.1.1 doesn't compile. Download 4.1. 

A 2 year necro, not bad!

-----------------------------------
saltpro15
Fri Jan 23, 2009 2:42 pm

RE:[tutorial] compiling source code into .exe file
-----------------------------------
4 year actually xD
