2 messages in com.mysql.lists.plusplusRe: Examples won't compile (mysql.h n...| From | Sent On | Attachments |
|---|---|---|
| Joseph Burneff | 05 Jun 2004 11:34 | |
| Sinisa Milivojevic | 08 Jun 2004 08:25 |
| Subject: | Re: Examples won't compile (mysql.h not found)![]() |
|---|---|
| From: | Sinisa Milivojevic (sin...@mysql.com) |
| Date: | 06/08/2004 08:25:42 AM |
| List: | com.mysql.lists.plusplus |
Joseph Burneff wrote:
This message is for those who are having difficulties compiling programs with MySQL++ on machines using Linux.
I noticed that others were having difficulty getting the examples to compile. In particular, mysql.h could not be found. I had the same problem initially as well. I initially installed MySQL using rpm. This installed the library files only. The include files were not installed. I then downloaded the source code to my /usr/local directory. Once this was complete, I was able to compile the program using the following command:
g++ myprog.cc -o myprog -I/usr/local/include/mysql/include -I/usr/include/sqlplus -L/usr/local/include/mysql/lib -L/usr/lib -lmysqlclient -lsqlplus
A make file would be useful here. Hope this helps. Please let me know if there is an easier way of doing this.
Joe
__________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/
You have to install devel RPM.
Use rpm -qa to find out what you installed actually.
--
Sincerely,
-- For technical support contracts, go to https://order.mysql.com/?ref=msmi __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <sin...@mysql.com> / /|_/ / // /\ \/ /_/ / /__ MySQL AB /_/ /_/\_, /___/\___\_\___/ Full time Developer and Support Coordinator <___/ www.mysql.com Larnaca, Cyprus




