Mail Archives: djgpp/1999/03/08/21:04:49
john_maple AT yahoo DOT com wrote:
>
> > >If I compile within
> > >RHIDE and say "Build All" the object file gets created but in the file
> > >compile to the .exe, it fails.
>
> To clarify, RHIDE gives this error in the status bar:
> Creating: hello.exe
> Error: c:djgpp/bin/ld.exe: Cannot open -lstdcx: No such file or directory
> (ENOENT)
See FAQ section 8.7.
> > >If I compile directly on the DOS command line with "gcc hello.cc -o
> > >hello.exe" I get the following errors:
> > >
> > >c:/djgpp/tmp\cccixyke(.text+0x19):hello.cc:undefined reference to `cout'
> > >c:/djgpp/tmp\cccixyke(.text+0x19):hello.cc:undefined reference to
> > >`ostream::operator(char const *)'
>
> Are these different errors, or are they two versions of the same error based
> on whether I am compiling the executable from the command line vs. RHIDE. Or
> are they merely symptoms of a larger problem?
When you just use `gcc', the C++ libraries (different from the headers)
are not linked, and so neither `cout' nor ostream's `(char const *)'
operator can be found. You are supposed to use `gxx' to link (create an
executable) for C++, as the README.1ST explains. Or else add `-lstdcxx'
to the command line manually.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -