TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ALL
from: COYOTE
date: 1997-08-26 01:02:00
subject: DJGPP with C++ add-on

Hi ppl, i'm kinda new with C++ but there is something i'm having problems 
with. I am using DJGPP with C++ (add-on or something) and wehn i try to 
compile something a with it, (a c++ file) it as an error. I'll write the 
source and all i write ....
Ok this is the source file. Its named CAR.CPP :
#include "car.hpp"  //CAR.HPP IS IN THE SAME DIRECTORY
void car::initialize(int in_wheels, float in_weight, int people)
{
   passenger_load = people;
   vehicle::initialize(in_wheels, in_weight);
}
int car::passengers(void)
{
   return passenger_load;
}
To compile it i go in the car.cpp directory and write:
C:\PATH>gcc car.cpp -o car.o  //THEN IT WRITES THE STUFF UNDER
c:/djgpp/lib\crt0.o(.data+0x92):crt0.s: undefined reference to `main'
C:\WINDOWS\TEMP\ccdaaaaa(.text+0x16):car.cc: undefined reference to 
`vehicle::in
itialize(int, float)'
c:/djgpp/lib/libc.a(crt1.o)(.text+0x312):crt1.c: undefined reference to 
ain'
C:\PATH>  //THEN IT RETURN TO DOS PROMPT
I don't know if that's enough information for you guys to help me ;)
Anyway if you need more info on what i got or something just ask me.
Thanx to anyone who TRIES to help, i appreciate it.
Please reply so i can continue to learn this wonderfull world of C++ (just 
kidding)
Thanx all
Coyote
--- GEcho 1.00
---------------
* Origin: 872's Home Bbs (613)831-3390 (1:163/133)

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