Michael Sullivan wrote:
<snip>
> OK. I've installed it from source and run ldconfig. It's in /usr/local
> now. When I try to build simple1.cpp however:
>
> michael@camille examples $ g++ simple1.cpp -lz -lmysqlclient_r -lmysqlpp
> -I/usr/local/include/mysql++/ -o simple
> In file included from /usr/local/include/mysql++/connection.h:38,
> from /usr/local/include/mysql++/mysql++.h:56,
> from util.h:31,
> from simple1.cpp:28:
> /usr/local/include/mysql++/common.h:37:27: error: mysql_version.h: No
> such file or directory
> /usr/local/include/mysql++/common.h:148:19: error: mysql.h: No such file
> or directory
>
<snip>
I've encountered the same problem. The solution is to also include the
header path "/usr/include/mysql" to your compile options. The path might
be different from that, depending on your setup; the main thing is to
find the directory containing "mysql.h" and "mysql_version.h" (should be
the same place), and include that directory as well as a -I (capital
eye) option.
-Daniel