FAQ
Hi!

I'm trying to compile a test-project using mysql++ under XCode 3.1 on
Mac OS 10.5.

I have set the "Header Search Paths" for the project to include
/usr/local/include/mysql++ and "Library Search Paths" to include
/usr/local/lib. I've also done mysql_config --libs and put the result
(-L/Applications/MAMP/Library/lib/mysql -lmysqlclient -lz -lm) in
"Other Linker Flags"
But I'm getting the following errors:

Building target "cpptest" of project "cpptest" with configuration "Release"

Checking Dependencies

CompileC build/cpptest.build/Release/cpptest.build/Objects-normal/i386/main.o
/Users/kabo/cpptest/main.cpp normal i386 c++
com.apple.compilers.gcc.4_0
cd /Users/kabo/cpptest
/Developer/usr/bin/gcc-4.0 -x c++ -arch i386 -fmessage-length=0
-pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os
-mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot
/Developer/SDKs/MacOSX10.5.sdk -fvisibility=hidden
-fvisibility-inlines-hidden -mmacosx-version-min=10.5 -gdwarf-2
-I/Users/kabo/cpptest/build/cpptest.build/Release/cpptest.build/cpptest.hmap
-F/Users/kabo/cpptest/build/Release
-I/Users/kabo/cpptest/build/Release/include
-I/usr/local/include/mysql++
-I/Applications/MAMP/Library/include/mysql
-I/Users/kabo/cpptest/build/cpptest.build/Release/cpptest.build/DerivedSources
-c /Users/kabo/cpptest/main.cpp -o
/Users/kabo/cpptest/build/cpptest.build/Release/cpptest.build/Objects-normal/i386/main.o

Ld /Users/kabo/cpptest/build/cpptest.build/Release/cpptest.build/Objects-normal/i386/cpptest
normal i386
cd /Users/kabo/cpptest
/Developer/usr/bin/g++-4.0 -arch i386 -isysroot
/Developer/SDKs/MacOSX10.5.sdk -L/Users/kabo/cpptest/build/Release
-L/Developer/SDKs/MacOSX10.5.sdk/usr/local/lib
-L/Applications/MAMP/Library/lib/mysql
-F/Users/kabo/cpptest/build/Release -filelist
/Users/kabo/cpptest/build/cpptest.build/Release/cpptest.build/Objects-normal/i386/cpptest.LinkFileList
-mmacosx-version-min=10.5 -L/Applications/MAMP/Library/lib/mysql -lz
-lm -lmysqlclient -o
/Users/kabo/cpptest/build/cpptest.build/Release/cpptest.build/Objects-normal/i386/cpptest
Undefined symbols:
"mysqlpp::Connection::connect(char const*, char const*, char const*,
char const*, unsigned int)", referenced from:
_main in main.o
"mysqlpp::Connection::~Connection()", referenced from:
_main in main.o
_main in main.o
"mysqlpp::Connection::Connection(bool)", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status


Can anybody please help me? Thanks!

Search Discussions

  • Joel Fielder at Sep 13, 2008 at 6:50 pm
    Have you:

    1) Built mysql++ successfully?
    2) Run at least one of the mysql++ examples successfully?
    3) Linked against mysqlpp - I couldn't see -lmysqlpp in your linker flags?

    Joel

    Calle Kabo wrote:
    I'm trying to compile a test-project using mysql++ under XCode 3.1 on
    Mac OS 10.5.


    But I'm getting the following errors:
    Undefined symbols:
    "mysqlpp::Connection::connect(char const*, char const*, char const*,
    char const*, unsigned int)", referenced from:
    _main in main.o
    "mysqlpp::Connection::~Connection()", referenced from:
    _main in main.o
    _main in main.o
    "mysqlpp::Connection::Connection(bool)", referenced from:
    _main in main.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status


    Can anybody please help me? Thanks!
  • Calle Kabo at Sep 13, 2008 at 8:03 pm

    Have you:

    1) Built mysql++ successfully? Yes
    2) Run at least one of the mysql++ examples successfully?
    Yes, i ran resetdb and then simple1.
    3) Linked against mysqlpp - I couldn't see -lmysqlpp in your linker flags?
    I added it now, it solved my problem. Many thanks! :)

    /Calle

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupplusplus @
categoriesmysql
postedSep 13, '08 at 6:34p
activeSep 13, '08 at 8:03p
posts3
users2
websitemysql.com
irc#mysql

2 users in discussion

Calle Kabo: 2 posts Joel Fielder: 1 post

People

Translate

site design / logo © 2022 Grokbase