MySQL Forums
Forum List  »  Connector/C++

/usr/bin/ld: cannot find -lmysqlclient when debugging a C programme
Posted by: jing qian
Date: May 02, 2011 07:49PM

Fedora 11 i386 OS

mysql-5.5.11-linux2.6-x86_64.tar.gz was uncompressed and installed on
the PC.

when a C programme using mysql database was debugged , the result is as
below:

gcc -g -o test1 -I/usr/include/mysql Test1.c -L/usr/lib/mysql
-lmysqlclient -lz
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when
searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when
searching for -lmysqlclient
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/i586-redhat-linux/4.4.0/../../../libmysqlclient.so when
searching for -lmysqlclient
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/i586-redhat-linux/4.4.0/../../../libmysqlclient.a when
searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when
searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.a when
searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld return 1

I have tried to solve the problem but failed.
Could you be kind to teach me how to run the programme right?
Maybe something like MySQL Connector/C、MySQL Connector/C++ need to be installed?

I am a greenhand and looking eagerly forward to your answer.

Best wishes!

Options: ReplyQuote


Subject
Views
Written By
Posted
/usr/bin/ld: cannot find -lmysqlclient when debugging a C programme
7537
May 02, 2011 07:49PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.