From: 'Jonathan W. <co...@co...> - 2004-08-11 00:43:35
|
On Tue, Aug 10, 2004 at 05:05:53PM -0600, Neil Chakrabarty wrote: > Sorry to keep bothering, but I can't figure this error out when making the > library: That's OK. I misunderstood earlier and thought you meant you had built mysqlcppapi but couldn't link your own program, so wasn't very clear. > /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.2/../../../crtn.o -Wl,-soname > -Wl,libmysqlcppapi-1.9-1.9.so.4 -o .libs/libmysqlcppapi-1.9-1.9.so.4.0.0 > /usr/bin/ld: cannot find -lmysqlclient ^^^^^^^^^^^^^^^^^^^^^^^^^ This is the only bit of interest, when creating the mysqlcppapi library the linker tries to find the MySQL client library, so you need to tell the linker how to find the file libmysqlclient.so You must specify the path to your mysql installation when you configure the library, by using --with-mysql e.g. ./configure --with-mysql=/usr/local/mysql --other-args ... If make still fails then you can tell the linker exactly where to find the lib by setting the LDFLAGS variable when running configure. The value of that variable will be passed directly to the linker. e.g. LDFLAGS=-L/usr/local/mysql/lib ./configure --other-args ... The directory you specify with -L in the LDFLAGS variable should be the one that contains libmysqlclient.so, which you should be able to find by typing "locate libmysqlclient". Let me know what the output of "locate" is and what options you passed to configure if you still can't build mysqlcppapi. jon -- "Probably all laws are useless; for good men do not need laws at all, and bad men are made no better by them." - Demonax the Cynic |