FAQ
Hello.

I'm new with compilation in c++.
What I have done :
download mysql++ from tengentsoft.net/mysql++
cd mysql++-2.2.0
./configure --with-mysql=/usr/local/mysql
make
sudo make install

It builds all. Examples works. Great.
So, when i try to create my own application. From example with xCode.
I create a new project.
Go to the projects settings
Header Search Paths : /usr/local/mysql/include
User Header Search Path : /usr/local/include/mysql++
Library Search Paths : /usr/local/mysql/lib
ZeroLink : No (default)
Other Linker Flags : -lmysqlclient -lm -lz


In my file : main.cpp
#include <iostream>
#include <mysql++.h>
#include <iostream>

using namespace std;

int main (int argc, char * const argv[]) {
mysqlpp::Connection con = new
mysqlpp::Connection("mybase","localhost","root");
return 0;
};

Xcode builds without errors but when the program runs :
[Session started at 2007-02-06 18:23:31 +0100.]
ZeroLink: unknown symbol '__ZN7mysqlpp10ConnectionC1EPKcS2_S2_S2_jcjS2_j'

cppproject has exited due to signal 6 (SIGABRT).

Please help me.

NB: excuse me for my bad english.

Search Discussions

  • Warren Young at Feb 6, 2007 at 7:00 pm

    Raphaël Reverdy wrote:
    Other Linker Flags : -lmysqlclient -lm -lz
    Add -lmysqlpp to the beginning of that list. -lmysqlclient is the MySQL
    C API library, which is required by MySQL++, but you also need the
    MySQL++ library.
  • Raphaël Reverdy at Feb 7, 2007 at 1:17 pm
    Thank you for your reponse but it doesn't work.
    I've got the same error :(

    2007/2/6, Warren Young <mysqlpp@etr-usa.com>:
    Raphaël Reverdy wrote:
    Other Linker Flags : -lmysqlclient -lm -lz
    Add -lmysqlpp to the beginning of that list. -lmysqlclient is the MySQL
    C API library, which is required by MySQL++, but you also need the
    MySQL++ library.

    --
    MySQL++ Mailing List
    For list archives: http://lists.mysql.com/plusplus
    To unsubscribe: http://lists.mysql.com/plusplus?unsub=raphael.reverdy@gmail.com
  • Ovidiu Bivolaru at Feb 7, 2007 at 1:21 pm
    Add /usr/local/lib to "Library Search Paths" too.

    Regards,
    Ovidiu

    Raphaël Reverdy wrote:
    Thank you for your reponse but it doesn't work.
    I've got the same error :(

    2007/2/6, Warren Young <mysqlpp@etr-usa.com>:
    Raphaël Reverdy wrote:
    Other Linker Flags : -lmysqlclient -lm -lz
    Add -lmysqlpp to the beginning of that list. -lmysqlclient is the MySQL
    C API library, which is required by MySQL++, but you also need the
    MySQL++ library.

    --
    MySQL++ Mailing List
    For list archives: http://lists.mysql.com/plusplus
    To unsubscribe:
    http://lists.mysql.com/plusplus?unsub=raphael.reverdy@gmail.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupplusplus @
categoriesmysql
postedFeb 6, '07 at 5:28p
activeFeb 7, '07 at 1:21p
posts4
users3
websitemysql.com
irc#mysql

People

Translate

site design / logo © 2022 Grokbase