Mail Archives: djgpp/1999/09/13/06:08:58
1) You should link libgpp.a in (it's not the default for gpp.exe)
2) You should use at least -O2 with libg++
So:
gpp -O2 -o rege rege.cc -lgpp
Andris
On Sat, 11 Sep 1999, Oleg Ossovitskii wrote:
>
> Hello, All, how do You do?
>
> When I try use `String' class I get error message. It's linker's error. Which
> libraries I must use with gcc 2.95? I not yet downloaded lgpp295b.zip, may this
> be reason of trouble? Is there release of gcc 2.95? I had previous installed gcc
> 2.81 and I'v downloaded gcc295b.zip, gpp295b.zip and objc295b.zip. Where is the
> trouble?
>
> ================== Begin of Windows Clipboard =================
> C:\Temp>gpp -s -o rege rege.cc
> c:/app/djgpp/tmp\cceNm1FG.o(.text+0x22):rege.cc: undefined reference to
> `String:
> :String(void)'
> c:/app/djgpp/tmp\cceNm1FG.o(.text+0x4b):rege.cc: undefined reference to
> `operato
> r>>(istream &, String &)'
> c:/app/djgpp/tmp\cceNm1FG.o(.text+0x5f):rege.cc: undefined reference to
> `operato
> r<<(ostream &, String const &)'
> c:/app/djgpp/tmp\cceNm1FG.o(.text+0x70):rege.cc: undefined reference to
> `String:
> :~String(void)'
> c:/app/djgpp/tmp\cceNm1FG.o(.text+0x9a):rege.cc: undefined reference to
> `String:
> :~String(void)'
> collect2: ld returned 1 exit status
> =================== End of Windows Clipboard ==================
>
> ================== Begin of rege.cc =================
> #include <_String.h>
>
> int main (void)
> {
> String s;
>
> cout << "\nInput some characters: ";
> cin >> s;
>
> cout << s;
>
> return 0;
> }
>
> =================== End of rege.cc ==================
>
> Best regardz, Oleg Ossovitskii mailto: stryker AT kaliningrad DOT ru
>
> ... Solve millenuim bug! - y2k.com [ FA EB FE C3 ]
>
- Raw text -