Date: Fri, 12 May 1995 09:35:47 -0400 From: kagel AT quasar DOT bloomberg DOT com To: bcarr AT dsm DOT fordham DOT edu Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: DJGPP Reply-To: kagel AT ts1 DOT bloomberg DOT com Date: Thu, 11 May 1995 13:11:43 -0400 From: Billy Carr Hi. [CHOPPED] Anyway, I find the migration difficult in that the steps for creating an .exe aren't very clear...I see bit and pieces in various docs, but nothing which says..."here are the steps that should be taken!". Sounds ridiculous, but migration is slow. I complied and linked a mid-sized app (about 20k lines of code over nine files) and the output was a.out. When I ran d:\>go32 a.out, the program info output to stdout, as it should, but appeared to hang. When I CTL-Z to break it, the message was can't find main(). PLEASE TELL ME WHAT AM I DOING WRONG OR NOT DOING! Oh yeah...the make file is nothing fancy or complicated! A few '-D' options along with some other compile options (-O -ansi -c) & the last line is 'gcc *.o'. When I write for Borland I would say 'bcc -efilename.exe *.o'. This works fine! I need somebody...HelP! What you are missing is the "-oexecname" (note case) option to gcc (this is equivalent to the -e option to bcc). This will create the executable as "execname" rather than "a.out" which is the default. You then can bind go32 to the executable to make a .exe file as: coff2exe execname -- Creates an executable named execname.exe which is bound with a copy of stub.exe which runs go32 for you. This .exe needs go32.exe in the users path at run-time and so you need to distribute go32.exe if you distribute your application. -or- coff2exe -s execname -- Creates an executable named execname.exe which is bound with a copy of go32.exe (and therefore MUCH larger than the previous example). This .exe does not require go32.exe to be distributed. -or- copy djgpp\bin\stub.exe \mybindir\execname.exe -- Makes a psuedo program named which runs go32 with execname binary when executed. You must run "stubedit execname.exe" and fill in the name of the executable. You can use this to create different named links to the same executable so that, for example, the program can change its behavior based on the value of argv[0] without having multiple copies of the large binary. -- Art S. Kagel, kagel AT ts1 DOT bloomberg DOT com That is the best government which desires to make the people happy, and knows how to make them happy. -- Lord Macaulay --