FAQ
Hello,

I'm trying to use mysql in a C++ project using Xcode 2.1. (and i'm using MAC
OS X 10.4.2). In order to do this i also installed mysql++ (because it was
noted on the website that it was already tested to work together with
xcode).

So in xcode I put the following search paths:

HEADER_SEARCH_PATHS:
/usr/local/include /usr/local/mysql/include

LIBRARY_SEARCH_PATHS:
/usr/local/lib /usr/local/mysql/lib

which are the correct paths including the headers and lib files.
I also added the flags:

OTHER_LINKER_FLAGS:
-bind_at_load -lmysqlpp -lmysqlclient

Now, if i run my testprogram (with #include <mysql++.h>) i get the following
runtime error message (with ZeroLink disabeled):

dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /usr/local/lib/libmysqlpp.2.dylib
Expected in: flat namespace

dyld: Symbol not found: _mysql_init
Referenced from: /usr/local/lib/libmysqlpp.2.dylib
Expected in: flat namespace

indicating that he couldn't find the mysqlclient lib. (the headers were
found otherwise an 'couldn't find <mysql.h>' error was given). But i don't
have a clue why he can't find that lib?

** with ZeroLink enabeled it's the following error:
** ZeroLink: unknown symbol '__ZN7mysqlpp10ConnectionC1Eb'

I'm new with Xcode so i don't know if the problem causing factor is 'a wrong
setting in Xcode', mysql++, mysql or just me forgetting something
essential...

Already thanks for answers and/or suggestions,
Jonatan

Search Discussions

  • Warren Young at Sep 6, 2005 at 12:22 pm

    Jonatan Taminau wrote:

    it was noted on the website that it was already tested to work together with
    xcode)
    Clarification: it is tested with the command-line compilers from Xcode.
    It is not tested in the IDE.
    dyld: lazy symbol binding failed: Symbol not found: _mysql_init
    Try reordering the link arguments. Some linkers behave differently
    depending on which library is given first.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupplusplus @
categoriesmysql
postedSep 5, '05 at 7:06a
activeSep 6, '05 at 12:22p
posts2
users2
websitemysql.com
irc#mysql

2 users in discussion

Jonatan Taminau: 1 post Warren Young: 1 post

People

Translate

site design / logo © 2023 Grokbase