delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/24/13:27:53

From: kimball AT sgrail DOT com (Kimball Thurston)
Subject: problem with SGI STL (was: Newbie getting started...)
24 Sep 1998 13:27:53 -0700 :
Message-ID: <3609E614.A7E2231E.cygnus.gnu-win32@sgrail.com>
References: <19980923200245 DOT 30760 DOT qmail AT findmail DOT com>
Mime-Version: 1.0
To: Ben Parrish <bparrish AT intellectonline DOT com>, gnu-win32 AT cygnus DOT com

Ben Parrish wrote:

> Well, everything looks installed okay, but when I compile this :
>
> #include <string>
> main() {
>    string test;
> }
>
> ...I get pages full of errors talking about "multiple definitions" of basic_string-related stuff.
>
> I apologize in advance for the low-level nature of this request.  I'll catch on fast.  :)
>

No worries. I've been trying to figure out why the SGI STL (now shipped with egcs, I guess) doesn't
compile <string>, _even under the SGI compiler_!!!! I've tried egcs, SGI CC 7.1.x under Irix, MS VC++
5.0. All to no avail.

I traced it back to a circular dependency between <string>, <stdexcept>, and <stl_string_fwd.h>:
1. <string> includes <stdexcept> as the second include file so it can throw length, etc. errors...
2. <stdexcept> includes <stl_string_fwd.h> (oh, and relies on class string being defined, BTW)
3. <stl_string_fwd.h> relies on char_traits, basic_string, et al. being defined for some typedefs....
But wait! I'm in the middle of the setup includes for <string>, so I haven't defined it yet!!! ACK.

If anyone knows a workaround to this, or how the heck SGI gets <string> to compile, please let me
(and I guess others) know.... we posted a message to SGI, but haven't heard anything...

thanks,

--
Kimball
mailto:kimball AT sgrail DOT com
---------------
"Time has little to do with infinity and jelly doughnuts." - Unknown


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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