Mail Archives: djgpp/2000/01/28/05:33:45
In article <3891087C DOT 624C5D1A AT americasm10 DOT nt DOT com>, ichapman AT nortelnetworks DOT com wrote:
>Hi all,
> I'd like to use the String objects which are part of cpp and
>libgpp.a. The line ***String x = "abcdetc";*** compiles fine. The
>Linker is undefined reference to String::String(char const *). I
>figured I'd got incompatible versions of the various files. I have
>gcc 2.81 119,808 June 6-98
>libgpp.a 394,290 June 6-98
>ld 2.8.1 316,982 July 16-97 To get the version I used --version
>flag.
>
..
I guess your library is OK, and I figured you tried to link with libgpp.a
The strange thing is, that you will have to compile with some optimizations.
Otherwise some inline functions will not get inlined and then the linker won't
find them. Don't ask why, I know it's strange.
So your call to gcc should look something like this:
gxx myprog.cpp -O -lgpp
--
Manni
- Raw text -