MySQL Forums
Forum List  »  Connector/C++

Dynamic Linking problem for MySQL++
Posted by: David Khanaferov
Date: August 20, 2008 03:41PM

Hi everyone, I have a problem with MySQL++ C++ library.
I installed it on my fedora 9 server along with the latest stable MySQL release all according to documentation. I had to build the MySQL++ binaries from the source to make them work with my system.

I then verified that all files are exist where they should:
the include directory with all the header files exists (/usr/include)
and the dynamic libraries exist in the /usr/lib directory

However when I try to compile the simplest C++ program using MySQL++ I get a linker error:
cmdline.cpp:(.text+0xa2): undefined reference to `mysqlpp::Connection::Connection(bool)'

here is the program I tried to compile:
#include <mysql++.h>

using namespace mysqlpp;

int main()
Connection conn(false);

According to the MySQL++ API this is a constructor for the Connection object and if you look into the coonection.h header file you will see the declaration of this function.
No matter what I do I get the error I mentioned earlier.
Does anyone know what's going on?

Options: ReplyQuote

Written By
Dynamic Linking problem for MySQL++
August 20, 2008 03:41PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.