Date: Thu, 21 Nov 1996 17:07:37 +0200 (IST) From: Eli Zaretskii To: Mordo Cc: djgpp AT delorie DOT com Subject: Re: DJGPP and STL In-Reply-To: <67D6724907@yarden.yarden.ac.il> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.