Hello everyone.
I know this is a C++ forum not MySQL forum but I need help with the C++ library for MySQL I am hoping that there will be people here who are knowledgeable about MySQL++.
My problem is that I can't get the g++ compile to link to the MySQL++ shared libraries.
I installed the latest stable release of MySQL and MySQL++, all as according to the documentation provided. MySQL++ I had to build from the source files to get it to work with my system. I am running a fedora 9 i386 server by the way.
I checked that the installation was good by making sure that the header files and shared object libraries exist and they do. /usr/include and /usr/lib accordingly
Then I wrote a small application in C++
#include <mysql++.h>
int main()
{
Connection conn(false);
}
It does nothing other than create a Connection object without connecting to the database
This is consistent with the MySQL Api
When I try to compile this I get a linker error:
cmdline.cpp:(.text+0xa2): undefined reference to `mysqlpp::Connection::Connection(bool)'
and no matter what I do, I always get this error
I tried indicating the path to the library files with -L /usr/lib and I tried using -l /usr/lib/libmysqlpp.so.3.0.6
Nothing works. Does anyone understand where the problem is?