TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: COYOTE
from: DARIN MCBRIDE
date: 1997-08-29 18:11:00
subject: DJGPP with C++ add-on

 -=> Quoting Coyote to All
 Co> Hi ppl, i'm kinda new with C++ but there is something i'm having
 Co> problems  with. I am using DJGPP with C++ (add-on or something) and
 Co> wehn i try to  compile something a with it, (a c++ file) it as an
 Co> error. I'll write the  source and all i write ....
 Co> Ok this is the source file. Its named CAR.CPP :
 Co> #include "car.hpp"  //CAR.HPP IS IN THE SAME DIRECTORY
[rest of car.cpp deleted]
 Co> To compile it i go in the car.cpp directory and write:
 Co> C:\PATH>gcc car.cpp -o car.o  //THEN IT WRITES THE STUFF UNDER
If you just want to make an object file, gcc requires a '-c' flag:
gcc -c car.cpp -o car.o
I usually just use gcc -c .cc  ... it defaults to an output of *.o for
-c compiles, and *.exe for full compiles when you only have one source file.
 Co> c:/djgpp/lib\crt0.o(.data+0x92):crt0.s: undefined reference to `main'
It's trying to do a full compile.
Good luck!
... He who lives by the sword would probably get arrested.
--- FastEcho 1.46
---------------
* Origin: House of Fire BBS - Toronto - (416)601-0085 - v.34 (1:250/536)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.