Hi,
please just reply to the list, not me.
* Keshava Krishna <keshavkrishna88@stripped> [091111 15:19]:
> Thanks Nick,
> I tried what u suggested,
>
> but i got the same errors..
> root@kk-desktop:~/kini# g++ -I/usr/local/include main.cpp
> In file included from /usr/local/include/mysql++/connection.h:38,
> from /usr/local/include/mysql++/mysql++.h:56,
> from main.cpp:1:
> /usr/local/include/mysql++/common.h:124:28: error: mysql_version.h: No such
> file or directory
> /usr/local/include/mysql++/common.h:182:20: error: mysql.h: No such file or
> directory
Now we are getting somewhere. So where did you install libmysql?
Ie where is mysql_version.h? Assuming you installed it in /usr/local/,
I guess the file would be at /usr/local/include/mysql/mysql.h.
Hint: you can probably use the "locate" comand to find it.
%locate mysql.h
Failing that:
% find / -name mysql.h
You have to tell the compiler where to look for the included files using the -I
flag. Assuming both mysq_version.h and mysql.h are in /usr/include/mysql
put the following code in a file... lets call it bar.cc
#include "mysql++.h"
{
}
Compile with:
g++ -I/usr/local/include/mysql++ -I/usr/local/include/mysql bar.cc
Nick.