From: <sinisa Date: March 14 1999 12:07am Subject: help! Installed RPMS, can't get link. Not FLOOR Problem. List-Archive: http://lists.mysql.com/mysql/185 Message-Id: <14058.64985.671087.901879@monster.local.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Wade Maxfield writes: > > I installed the Mysql 3.22 rpms off the tcx.se website. Mysql is up and > running. Installed the clients and thde development rpms. > > I am able to compile a program without errors. As soon as I try to > link, I get mysql_connect, mysql_*** (put what you want in ***) not > found. > > I am compiling and linking with the following: > > gcc -g -o foo -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient main.c > > no errors on compile. > on link, I get the "undefined reference" error. > > I tried -llibmysqlclient, -lmysqlclient.a, -llibmysqlclient.a, and more > options. Most of the time, I get "libmysqlclient" not found in the > compile stage. > > HELP! I tried -lsocket -lnsl and others. > > _any_ suggestions? I searched the FAQ and all the documentation, to no > avail. Do I have to compile the rpm source to make it work???? > > wade Hi! First check out whether there is libmysqlclient.a or .so in /usr/lib/mysql. If it is there and looks OK, then try to run the above in two stages, first compile and then link. Sinisa +---------------------------------------------------------------------+ | TcX ____ __ _____ _____ ___ == mysql@stripped | | /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic | | /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sinisa@stripped | | /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Belgrade | | /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|_____ Serbia | | ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ | | /*/ \*\ Developers Team | +---------------------------------------------------------------------+