autoconf
[Top][All Lists]
Advanced

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

Re: AC_CHECK_LIB doesn't find existing, linkable libraries


From: Braden McDaniel
Subject: Re: AC_CHECK_LIB doesn't find existing, linkable libraries
Date: Fri, 25 Feb 2005 16:19:36 -0500
User-agent: Mozilla Thunderbird 0.9 (X11/20041127)

Harry Mangalam wrote:
Hi All,

salient points: Linux xxx.xxx.uci.edu 2.6.8.1-4-amd64-k8-smp #1 SMP Fri Jan 14 11:33:56 UTC 2005 x86_64 GNU/Linux


config.log pointed me to a number of erroneous conditions which I've now corrected. However, I'm still experiencing the same problem.
That is, that a library that is found by ldconfig:
529 $ ldconfig -v |head
ldconfig: Path `/lib64' given more than once
ldconfig: Path `/usr/lib64' given more than once
/usr/local/lib:
        libnco_c++-2.9.9.so -> libnco_c++.so
        libnco-2.9.9.so -> libnco.so
        libdap++.so.1 -> libdap++.so.1.0
        libnc-dods.so.1 -> libnc-dods.so.1.0      <------ this is it

and which has the right symbols defined:

530 $ nm /usr/local/lib/libnc-dods.so.1 |grep nc_open
0000000000031540 T lnc_open
0000000000020830 T nc_open

but it cannot be grokked by the configure script which is set up as follows:
configure.in:    AC_CHECK_LIB([nc-dods],[nc_open],,enable_dods=no)


config.log reports:
configure:24221: checking for nc_open in -lnc-dods
configure:24251: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c -ldap++ -lnc-dods -ldap++ -
/usr/bin/ld: cannot find -lnc-dods
collect2: ld returned 1 exit status

I'm afraid I'm flummoxed with this - any other hints?

You probably need to be linking with g++. Use AC_LANG_PUSH([C++]) before your instantiation of AC_CHECK_LIB (and AC_LANG_POP afterward).

Braden




reply via email to

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