Re: Running MYSQL++ on OS X in Xcode
Hi,
If I read the message correct LD tries to link your files using a shared library, but libmysqlclient.a is not a shared library file. I'm not sure, but I think the linker needs some extra flag.
Did you run the mysql_config command and did you use the [--libs] in your linking command? Do not change the order of the -l options, that could lead to problems.
my mysql_config output:
$ ./mysql_config
Usage: ./mysql_config [OPTIONS]
Options:
--cflags [-I/usr/local/mysql/include -fno-omit-frame-pointer]
--include [-I/usr/local/mysql/include]
--libs [-L/usr/local/mysql/lib -lmysqlclient -lm -lz]
--libs_r [-L/usr/local/mysql/lib -lmysqlclient_r -lm -lz]
--socket [/tmp/mysql.sock]
--port [3306]
--version [4.1.9]
--libmysqld-libs [-L/usr/local/mysql/lib -lmysqld -lm -lm -lz]
$ ./mysql_config --libs
-L/usr/local/mysql/lib -lmysqlclient -lm -lz
HTH
John
Subject
Views
Written By
Posted
12463
October 26, 2005 11:06AM
6464
November 02, 2005 04:54AM
5683
November 13, 2005 08:20PM
Re: Running MYSQL++ on OS X in Xcode
5533
November 14, 2005 02:50AM
4968
November 14, 2005 07:13AM
5047
November 15, 2005 01:31PM
4333
February 25, 2006 06:35AM
4907
April 13, 2006 02:07PM
3993
September 19, 2006 10:23AM
4158
September 25, 2006 03:51AM
46554
November 17, 2006 07:57PM
7731
January 22, 2009 06:22AM
4740
January 25, 2009 03:56PM
4440
April 24, 2009 12:12PM
6458
April 25, 2009 01:09AM
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.