[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: linker cant locate a 3rd party lib
From: |
Ralf Wildenhues |
Subject: |
Re: linker cant locate a 3rd party lib |
Date: |
Wed, 12 Oct 2005 08:50:02 +0200 |
User-agent: |
Mutt/1.5.11 |
Hi Jack,
* Jack Nguyen wrote on Tue, Oct 11, 2005 at 11:57:34PM CEST:
> On 10/11/05, Ralf Wildenhues <address@hidden> wrote:
> > * Jack Nguyen wrote on Tue, Oct 11, 2005 at 07:41:43PM CEST:
> > > after
> > > ./configure and make resulted in libfoo.la <http://libfoo.la>, i tried
> > > $libtool gcc -o test test.c libfoo.la <http://libfoo.la>
> > > gcc -o test test.c ./.libs/libfoo.a -L /src/dir/ -lmkl_lapack -lm
> > > /usr/bin/ld cannot find -lmkl_lapack
> > > How do you add -L /mkl_lapac/dir in either
> > > configure.ac<http://configure.ac>or
> > > Makefile.am <http://Makefile.am>. Obviously LD_FLAGS doesnt do it!
> >
> > Try LDFLAGS instead of LD_FLAGS:
>
> LDFLAGS is already defined in my configure.ac. In fact i use it to do
> AC_CHECK_LIB(mkl,some_func). the problem is when i try to test my
> libfoo.la, it cant find the library it libfoo.la depends on. the
> console output is
> $libtool gcc -o test test.c libfoo.la
> gcc -o test test.c ./.libs/libfoo.a -L /src/dir/ -lmkl_lapack -lm
> /usr/bin/ld cannot find -lmkl_lapack
> I want gcc to look into the -L /mkl/lapack/dir, not just /src/dir
Please show contents of `libfoo.la' (dependency_libs should contain the
`-L..' addition).
Please also show `./libtool --version', the configure.ac snippet around
where you `AC_CHECK_LIB(mkl..)', and the Makefile.am part concerning
libfoo.la. You do use Automake, right? If not, then please show
however else you generate libfoo.la.
Cheers,
Ralf