Mail Archives: djgpp/1998/11/23/15:25:14.1
Moris Morisson schrieb in Nachricht
<19981123131535 DOT 12543 DOT rocketmail AT send102 DOT yahoomail DOT com>...
[...]
>Ok, the problem is I can compile and run my C programs just fine, but
>when I try to compile and run my C++ programs ( gcc -c
>prognamesource.cc -o rognamedest.exe) it normally does nothing but
>display the prompt again
This command line would produce an object file with the extension .EXE.
Trying to run this "EXE" would definately be a stupid idea.
Leave out the -c switch.
> (??- of course! the program displays at least
>something more than that!!), or it halts the CMD session. Then,
>I try to compile to obtain the object file ( gcc -c prognamesource.cc)
>and use coff2exe to get the
>executable file, this is when the above message appears.
Same here - you use coff2exe to convert an object file to an exe??
You seem to be leaving out the linker stage. the -c switch tells the
compiler to only produce an .o file - without it, it automatically runs
the linker.
Sorry if I tell you nothing new, probably your problem is something
totally different, but what you say makes me think you're on the
wrong track :-)
Peter Remmers
- Raw text -