This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Should the passed command parameters result into the same error messages for a configuration test?
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Markus Elfring <Markus dot Elfring at web dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 24 Mar 2013 17:41:26 +0000
- Subject: Re: Should the passed command parameters result into the same error messages for a configuration test?
- References: <51114C3A dot 3030806 at web dot de> <514F2C83 dot 5020806 at web dot de>
On 24 March 2013 16:40, Markus Elfring wrote:
> Would anybody like to help with further ideas to resolve the shown error
> mesaages around "undefined references"?
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56709
In the other command (which you repeatedly failed to actually show, so
noone could possibly answer you) at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56709#c3 the libraries
come after the source file, so it's the correct and expected behaviour
that you get different results. This is user error, not a bug. The
'ld' man page is very clear about this:
The linker will search an archive only once, at the location where
it is specified on the command line. If the archive defines a
symbol which was undefined in some object which appeared before the
archive on the command line, the linker will include the
appropriate file(s) from the archive. However, an undefined symbol
in an object appearing later on the command line will not cause the
linker to search the archive again.