Mail Archives: djgpp/1995/04/14/06:54:44
> think I have all of the parts that I need. I am trying to compile a
> program that I made on a special addition of turbo C++. I get a bunch of
> errors when I try "cc1 rob1.cpp" or "cc1plus rob1.cpp" (without the
This is NOT the way to invoke gcc. To compile rob1.cpp, do this:
gcc -c rob1.cpp
This will produce rob1.o (an object file). To compile and link to get
an executable, do this:
gcc -o rob1 rob1.cpp -lgpp -lm
coff2exe rob1
This will produce rob1.exe which you can run as any DOS program. If you
have more than one module to link into an executable, compile each one of
them with -c switch as above, then link thusly:
gcc -o yourprog rob1.o sub1.o sub2.o sub3.o .... -lgpp -lm
coff2exe yourprog
- Raw text -