delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/27/21:27:10

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: problems with _String.h : HELP!
Date: Thu, 26 Mar 1998 18:48:08 -0500
Organization: Two pounds of chaos and a pinch of salt.
Lines: 29
Message-ID: <351AE938.19A@cs.com>
References: <351A6D02 DOT DFEC6CF1 AT obspm DOT fr>
NNTP-Posting-Host: ppp244.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

William Gacquer wrote:
> 
> Hi !
>         I have some codes using the String (C++) class. This codes
> run OK on cygnus b19 gnuwin32 and on my linux box. The compilation
> is OK with DJGPP + g++2.8 but the linking fails : It does not
> find the String section in the libraries.

This might be a bug in the gcc 2.8.0 library.  Another user had this
exact problem and I successfully solved it by compiling with
optimizations enabled ('-O' switch).

The link errors most likely happen because the String class functions
are inlined in the <_string.h> header file, but this is the only place
where they are kept.  If you compile without optimizations, inlining is
not enabled, and thus the compiler will look in the library to find the
code for the String class and fail.  To me this indicates a problem with
the library.

Please, could somebody who knows more about the library tell me if I am
completely off-base here?  Thanks!

- 
---------------------------------------------------------------------
|      John M. Aldrich       |"Men rarely (if ever) manage to dream |
|       aka Fighteer I       |up a god superior to themselves. Most |
|   mailto:fighteer AT cs DOT com   |gods have the manners and morals of a |
| http://www.cs.com/fighteer |spoiled child."    - Lazarus Long     |
---------------------------------------------------------------------

- Raw text -


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