delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/12/22:28:53

Date: Thu, 12 Feb 1998 19:27:45 -0800 (PST)
Message-Id: <199802130327.TAA12200@adit.ap.net>
Mime-Version: 1.0
To: Gerald Wann <photonuv AT kudos DOT net>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: <_string.h> error

At 05:53  2/12/1998 -0500, Gerald Wann wrote:
>Hi -
>
>My apologies in advance if this question is not djgpp-specific, but here goes.
>
>the program
>
>#include <_string.h>
>
>int mani(void)
>{
>	String str;
>	return 0;
>}
>
>now compiles , but when i attempt to build the project, it gives me an
>
>garbd.cc(48) Error: undefined reference to 'String::String(void)'
>
>error message (and a similar one for the destructor).
>
>Would some poor soul take pity on me and tell me what obvious blunder
>i'm now making ;-)?
I believe the String class is in the libg++ library. Add `-lgpp' to your
link command line, and see if that fixes it. Make sure you are linking with
`gxx', also.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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