2 messages in com.mysql.lists.plusplusRe: Examples won't compile (mysql.h n...
FromSent OnAttachments
Joseph Burneff05 Jun 2004 11:34 
Sinisa Milivojevic08 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.

You have to install devel RPM.

Use rpm -qa to find out what you installed actually.

Sincerely,