[odb-users] Unable to build with static libraries
Boris Kolpackov
boris at codesynthesis.com
Wed Oct 10 13:30:02 EDT 2012
Hi Chris,
Chris Richards <chris.richards at yellowfeather.co.uk> writes:
> When I try to build the ODB examples with:
>
> ./configure --disable-shared --with-database=mysql
> make
>
> I get lots of undefined references to 'mysql_stmt_xxx' methods.
Hm, for some reason libtool doesn't pass dependency libraries when
linking statically. I will have to look into this.
In the meantime, an easy workaround is to configure examples like
this:
./configure --with-database=mysql LDFLAGS=-L/usr/lib/mysql LIBS=-lmysqlclient_r
Change /usr/lib/mysql to /usr/lib64/mysql in the above command line if
you are using a 64-bit distribution.
Boris
More information about the odb-users
mailing list