Re: Unable to call C Prepared API's on Linux(Redhat 9)
Posted by: Matthew Wesley
Date: June 24, 2005 01:26PM

I was having similar errors of undefined references to mysql functions in Redhat 3. I usually work on a very up-to-date edition of Gentoo, and from my recent work on Redhat it seems Redhat frequently has linking errors. I was able to solve my trouble by adding the client library to my compiler command explicitly. On my system, it looked like this:

gcc -o filename file1.o file2.o -L/usr/lib/mysql -lmysqlclient_r -I/usr/include/mysql -lnsl -lm -lpthread ---> /usr/lib/mysql/libmysqlclient.a <---

Hope that works for you as well.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Unable to call C Prepared API's on Linux(Redhat 9)
597
June 24, 2005 01:26PM


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.