Mail Archives: djgpp/1997/07/07/11:21:02
You wrote:
>I am making the transition from c to c++ and I'm trying to figure out djgpp
>at the same time. When I compile the following code from the iostream docs:
> [C++ Hello world program deleted]
>I get the following errors:
>c:/djgpp/tmp\ccdaaaaa(.text+0x22):work.cc: undefined reference to `cout'
>c:/djgpp/tmp\ccdaaaaa(.text+0x27):work.cc: undefined reference to
>`ostream::oper
>ator<<(char const *)'
What did the command line invoking the compiler look like? My guess is
something like:
gcc -o work work.cc
The problem with this is it doesn't know to link in the C++ libraries. Try this:
gxx -o work work.cc
gxx is the same as g++ on a unix box, just DOS doesn't allow `+' in a
filename. gxx automatically looks in the C++ libraries.
HTH
Nate Eldredge
eldredge AT ap DOT net
- Raw text -