[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding a path for library checking.

From: Michael Maillot
Subject: Re: Adding a path for library checking.
Date: 07 Mar 2003 13:16:01 +0100

Le Fri 07/03/2003 ? 03:05, Steven G. Johnson a ?crit :
> Look in config.log to see what the error message from the compiler was 
> that triggered the link failure.
> Steven

Thanks, it's OK now. The problem wasn't very clear to me, but it is
clear now.

I had a library "A" in which some symbols were missing (and I didn't
know that until I had to use this library in a program.) When compiling
this library, the compiler didn't tell me that symbols were missing (and
this is totally normal.)

I had a second library "B" that needed to be linked against the library
"A". When using the autoconf AC_CHECK_LIB directive, autoconf seems to
create a "real" program to check if the library exists or not. And at
this time, autoconf got a "linking error" saying that some symbols were
missing in "A" (and this is exactly the error I could see in the
config.log). That's why the AC_CHECK_LIB failed, but as I didn't see the
error message, I thought it was something else.
And the reason why the "manual" linking succeeded is simple : I was
building a second library "B" and not a "full - real" program. So when
compiling "B" and linking B against A, gcc wouldn't tell me that symbols
were missing (which is perfectly normal, because these symbols might be
defined in another library later, I guess.)

When I endly made a program that used both A and B, gcc told me that
some symbols were missing in A... but it was 2 weeks after the problem I
had with autoconf, so I didn't realised there could be a link between
the problem I had with Autoconf and the fact that some symbols were not
correctly defined in my libA...

This problem happened because of this : I was too busy (or lazy ;-) )to
fully read the autoconf manual, in which I would have probably learnt
that the config.log file is created each time I launch the "configure"
script and not when I launch the "autoconf" program. 
And I'm a newbie with autoconf too...

Thank you Steven for showing me where I had to look at!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]