MySQL Forums
Forum List  »  Connector/C++

using MySQL Connector/C++ with embedded mySQL
Posted by: m g
Date: July 23, 2009 12:39PM

Is it possible to use the MySQL Connector/C++ component with the embedded mySQL component?

I have a project in XCode on OSX using the libmysqlcppconn-static.a library, which also requires linking with libmysqlclient.a. This works fine talking to a mySQL server running as a daemon.

However, I want to try using embedded mySQL, rather than having it run as a daemon. So I tried adding libmysqld.a, but I cannot get things to build and run correctly.

If I link with libmysqlcppconn-static.a, libmysqlclient.a, and libmysqld.a, i get errors about duplicate .o files when trying to run the application that I believe are caused by linking with both libmysqlclient.a and libmysqld.a.

If I try to only link with libmysqlcppconn-static.a and libmysqld.a I get linker errors about undefined symbols.

It is my understanding that libmysqld.a is sort of a replacement for libmysqlclient.a that allows one to "embed" mySQL into an application. So if an application is built using libmysqlclient.a, you can replace that with libmysqld.a.

But is that only true when one uses the C API (in libmysqlclient.a) for talking to mySQL? what if you want to use the C++ API (in libmysqlcppconn-static.a) ?

Options: ReplyQuote


Subject
Views
Written By
Posted
using MySQL Connector/C++ with embedded mySQL
4115
m g
July 23, 2009 12:39PM


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.