www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/21/10:25:51

Date: Thu, 21 Nov 1996 17:07:37 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Mordo <MORDO AT yarden DOT yarden DOT ac DOT il>
Cc: djgpp AT delorie DOT com
Subject: Re: DJGPP and STL
In-Reply-To: <67D6724907@yarden.yarden.ac.il>
Message-Id: <Pine.SUN.3.91.961121170052.24365C-100000@is>
Mime-Version: 1.0

On Thu, 21 Nov 1996, Mordo wrote:

> You gave me an idea and here is the solution:
> In lib\specs file there is twice -lgcc. It's wrong of course; instead 
> of this it should be -lstdcx to link with Standard C++ Library.
> Now it works. Thank you to give me an idea :-)Bye!

Please don't do that!  This is one wrong idea that you got, and I 
definitely didn't mean to tell you anything like that  The file 
lib/specs mentions -lgcc twice for a very good reason: some functions 
from libc.a call functions from libgcc.a, while some other functions in 
libgcc.a call functions in libc.a.  Since ld.exe is a one-pass linker, 
you must mention -lgcc both before and after -lc, or else you will get 
unresolved externals in some cases.  So please restore lib/specs to its 
previous glory!

However, based on what you tell, I think I can guess the *real* reason 
for your trouble.  You are using DJGPP v2.0 (or at least gxx.exe is from 
DJGPP v2.0), and that version of gxx indeed didn't include -lstdcx in the 
arguments passed to the linker.  So either upgrade to DJGPP v2.01 or 
append -lstdcx to every link command line you pass to gxx.

- Raw text -


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