delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/13/06:08:58

X-Authentication-Warning: ieva01.lanet.lv: pavenis owned process doing -bs
Date: Mon, 13 Sep 1999 09:48:49 +0300 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
To: Oleg Ossovitskii <Oleg DOT Ossovitskii AT p20 DOT f44 DOT n478 DOT z2 DOT fidonet DOT org>
cc: djgpp AT delorie DOT com
Subject: Re: Troubles with _String.h & _Regex.h
In-Reply-To: <937091118@p20.f44.n478.z2.FidoNet.ftn>
Message-ID: <Pine.A41.4.05.9909130946490.39080-100000@ieva01.lanet.lv>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019