Mail Archives: djgpp/1995/11/23/07:54:02

Date: Thu, 23 Nov 1995 11:41:07 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Alex Schroeder <alex AT zool DOT unizh DOT ch>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Using the GNU C++ library & linkage errors

On 22 Nov 1995, Alex Schroeder wrote:

> My Problem is, that I cannot compile any code which uses the libgpp.a
> library (ie. the String class and all the other ones). I tried
> undefined reference to `lib_error_handler'
> undefined reference to `ws(istream &)'
> undefined reference to `__uflow'

Your test program compiles and links for me without any problem.  The 
output of `gcc -v' and the environment settings you've posted seem also 
to be OK; about the only problem I see is that in my case, gcc also adds 
`-L/lib -L/usr/lib' to the ld command line which seems strange.

The functions which the linker doesn't find are all in the libgpp.a 
library (some of them are also in libiostr.a), so it looks like something 
is wrong with the linker reading libgpp.a.  A few things I'd advise to 

	1) The version of libgpp.a you are using.  The one I have is 
dated January 18 1995 and its size is 532308 bytes.

	2) The version of gcc.exe you are using.  Mine is dated February 
1 1995 and its size is 79872 bytes.

	3) Your system sets FILES= to a number which is too low, so that 
ld.exe cannot open libgpp.a (but I think it should have printed a message 
to that effect).

	4) Your environment doesn't have enough space for all the 
environment variables which gcc needs.

	5) Try passing the --verbose option to ld to see what files it 
opens while linking.

- Raw text -

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