Mail Archives: djgpp/1999/06/23/08:51:26
On Wed, 23 Jun 1999, Mark Collinson wrote:
> I am having a spot of trouble with the _String.h file. The C++ compiler
> cannot find it.
That's not what the error message says.
> C:\mark\code>gxx -Wall -o strtest.exe strtest.cpp
> c:/djgpp/tmp\cccygxwf(.text+0x1b):strtest.cpp: undefined reference to
> `String::String(void)'
See? It doesn't say anything about _String.h, it complains about missing
functions. And that means that you didn't tell the linker to search some
of the libraries, or that you don't have those libraries installed.
I believe that String is in libgpp.a, so try appending -lgpp to the end
of the compilation command. If that doesn't work, you will need to
install the file lgp2811b.zip.
- Raw text -