From: "John M. Aldrich" 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 | ---------------------------------------------------------------------