Computer Science Canada

[tutorial] compiling source code into .exe file

Author:  Tony [ Mon Dec 08, 2003 7:31 pm ]
Post subject:  [tutorial] compiling source code into .exe file

wow Shocked never though this could count as a tutorial, but apparently I came across this question posted more then once Rolling Eyes 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 Rolling Eyes Go to HoltSoft and download latest patch (which is in fact larger then the installer file you got in first place Laughing) If you're using an old DOS IDE instead... well... I refuse to talk to you Rolling Eyes Go get your software updated somewhere.

Now, take a closer look at your menu... See that "Run"? Well I'm sure you do... HoltSoft has done a great job making interface to confuse anyone by naming a bunch of different things with same name Rolling Eyes

Posted Image, might have been reduced in size. Click Image to view fullscreen.

I'm talking about THAT run menu item Very Happy Click it.

Now a bunch of options come up:
Posted Image, might have been reduced in size. Click Image to view fullscreen.

You want the "Generate stand-alone program" item.

That brings up yet another menu Laughing
Posted Image, might have been reduced in size. Click Image to view fullscreen.

Those are just some options your program can have while running.

Clicking "ok" will compile your hello world program into a 600kb executable file Laughing

Author:  Dan [ Tue Dec 09, 2003 3:06 pm ]
Post subject: 

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).

Author:  Omicron91 [ Mon Dec 20, 2004 5:18 pm ]
Post subject: 

Do you have to have Turing installed on a computer to run the .exe?

Author:  rdrake [ Mon Dec 20, 2004 5:59 pm ]
Post subject: 

Omicron91 wrote:
Do you have to have Turing installed on a computer to run the .exe?
Nope, it works without it.

Author:  Jonny Tight Lips [ Thu Dec 23, 2004 7:32 pm ]
Post subject: 

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?

Author:  Andy [ Thu Dec 23, 2004 10:02 pm ]
Post subject: 

i think they include it all in the exe yea im pretty sure they do.. thats y turing is so crap

Author:  Tony [ Thu Dec 23, 2004 11:07 pm ]
Post subject: 

only the code is compiled (though all of it). You still have to include all of your image and data files separatly.

Author:  [Gandalf] [ Thu Jan 13, 2005 6:39 pm ]
Post subject: 

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...

Author:  Mazer [ Thu Jan 13, 2005 7:52 pm ]
Post subject: 

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.

Author:  Drakain Zeil [ Sun Jan 16, 2005 5:39 pm ]
Post subject: 

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.

Author:  Bacchus [ Sun Jan 16, 2005 7:45 pm ]
Post subject: 

did it say something like a missing end if or end for? pretty sure it would just be syntax

Author:  [Gandalf] [ Sun Jan 16, 2005 10:33 pm ]
Post subject: 

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).

Author:  Shyfire [ Fri Apr 08, 2005 10:13 am ]
Post subject:  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

Author:  [Gandalf] [ Mon May 09, 2005 12:56 am ]
Post subject: 

What is a good .exe compressor? And how does it compress the executable?

Author:  Shyfire [ Mon May 09, 2005 3:45 pm ]
Post subject:  well.......

1: cexeGui is what i use
2: it works something like winzip but still keeps your .exe playable with out unzipping.

Author:  [Gandalf] [ Mon May 09, 2005 11:54 pm ]
Post subject: 

trojan detected, biotch... Rolling Eyes

I tried a bunch of other ones, but they seem to not work with Turing .exe's...

Author:  Shyfire [ Tue May 10, 2005 1:16 pm ]
Post subject: 

well thanks for the compliment smart @$$
i didn't get a trojan so hahahahahhahha(evil laugh)
**thinks to him self** i am all mighty

Author:  [Gandalf] [ Wed May 11, 2005 12:02 am ]
Post subject: 

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 Sad.

Author:  Hikaru79 [ Wed May 11, 2005 6:14 am ]
Post subject: 

Coutsos wrote:
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. Sad

Author:  Shyfire [ Wed May 11, 2005 10:54 am ]
Post subject: 

srry dude i was in a bad mood and that was just the iceing on the cake
**so to speak**

Author:  neufelni [ Fri May 13, 2005 7:30 am ]
Post subject: 

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?

Author:  Shyfire [ Fri May 13, 2005 10:30 am ]
Post subject: 

no clue

*did u use a compressor if so it could have been a crappy one if not the i dont know

Author:  [Gandalf] [ Fri May 13, 2005 3:07 pm ]
Post subject: 

Hmm, the error I get is:
Quote:
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...

Author:  theguru [ Sat Oct 08, 2005 4:52 pm ]
Post subject: 

Hikaru79 wrote:
Coutsos wrote:
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. Sad


that's why i prefer c++ but it's great that you can actually compile it.

Author:  tianxiao [ Fri Jan 23, 2009 2:03 pm ]
Post subject:  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)

Author:  Insectoid [ Fri Jan 23, 2009 2:10 pm ]
Post subject:  RE:[tutorial] compiling source code into .exe file

Turing 4.1.1 doesn't compile. Download 4.1.

A 2 year necro, not bad!

Author:  saltpro15 [ Fri Jan 23, 2009 2:42 pm ]
Post subject:  RE:[tutorial] compiling source code into .exe file

4 year actually xD


: