[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Libraries in non-standard locations
From: |
Norbert Sendetzky |
Subject: |
Libraries in non-standard locations |
Date: |
Mon, 12 Jun 2006 23:24:32 +0200 |
User-agent: |
KMail/1.9.1 |
Hi all
Another problem appeared:
If someone have a library in a non-standard location, usually
LDFLAGS=-L /path/to/lib is used but this doesn't seem to work:
/bin/sh ../../libtool --tag=CC --mode=link
gcc -std=gnu99 -g -O2 -L /usr/lib/mysql -o
libmysqlbackend.la -rpath /usr/local/lib/opendbx -module -version-info
2:0:1 -L /usr/lib/mysql
libmysqlbackend_la-mysqlbackend.lo -lmysqlclient_r -lz -ldl
gcc -std=gnu99 -shared .libs/libmysqlbackend_la-mysqlbackend.o
-L/home/nose/Project/opendbx/devel/backends/mysql -lmysqlclient_r -lz -ldl
-Wl,-soname -Wl,libmysqlbackend.so.1 -o .libs/libmysqlbackend.so.1.1.0
/usr/bin/ld: cannot find -lmysqlclient_r
collect2: ld returned 1 exit status
As you can see the call to libtool include the "-L /usr/lib/mysql", but the
gcc call doesn't. My Makefile.am for this lib is
pkglib_LTLIBRARIES = libmysqlbackend.la
libmysqlbackend_la_SOURCES = mysqlbackend.c mysqlbackend.h
libmysqlbackend_la_CFLAGS = @PKGCFLAGS@
libmysqlbackend_la_LDFLAGS = -module -version-info
@LIBVERSION@ -L /usr/lib/mysql
libmysqlbackend_la_LIBADD = address@hidden@
and I've never fiddled around with LDFLAGS in my configure.ac. My system is
Debian Etch with automake 1.9.6 but this appeared also on RHEL/CentOS 4
Thank you for any hints
Norbert
--
OpenPGP public key
http://www.linuxnetworks.de/norbert.pubkey.asc
pgpCdOe0EAVWG.pgp
Description: PGP signature
- Libraries in non-standard locations,
Norbert Sendetzky <=