Mail Archives: djgpp/1998/05/03/19:17:45
On Sat, 02 May 1998 13:57:30 -0400, "John M. Aldrich"
<fighteer AT cs DOT com> wrote:
hi john,
thanks for your quick reply
>mimo wrote:
>>
>> Error: test.o: In function `__tcf_0':
>> Error: test.cc(.text+0x1f): undefined reference to
>> `String::~String(void)'
>> Error: test.o: In function `main':
>> Error: test.cc(.text+0x49): undefined reference to
>> `String::String(char const *)'
>> test.cc(2) Error: undefined reference to `operator<<(ostream &, String
>> const &)'
>
>That's very interesting. No matter what I did, I was unable to
>reproduce your exact results, although I saw plenty of slightly
>different errors. Perhaps it's because I'm using gcc 2.8.0 and you're
>still using 2.7.2.1. In any case, the solution is simple: you must
no, i m using version 2.80 (really! i m honest)
>link all required C++ libraries when you compile. To use the String
>class, you have to link with both -lstdcxx and -lgpp.
i tried this too, since i followed your instructions in this
newsgroup, but the strange thing is, that nothing changed, besides
from sometimes getting even more errors :)
>
>You have two other problems in your code: in order to use cout, you
>should #include <iostream.h> (even though it is included already by
><_string.h>), and void is not a legal return type for main().
i solved my problem somehow, i think its more or less a workaround
i included libgpp into my project and it links now, BTW i had the same
problem with the scitech grx library i remember. so i guess there s
some kind of bug in the relation between the linker and the archives
(this is really just a guess)
and i would really like to know how to solve it - just for fun!
anyway, thanks for your help
mimo
- Raw text -