Entropy.ch Discussion Forums Forum Index Entropy.ch Discussion Forums
Discussion forums about Mac OS X software development.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Installing libmysqlclient as shared library on OS X 10.3

 
Post new topic   Reply to topic    Entropy.ch Discussion Forums Forum Index -> MySQL on Mac OS X
View previous topic :: View next topic  
Author Message
pamalite



Joined: 31 Jul 2004
Posts: 3

PostPosted: Wed Feb 02, 2005 3:23    Post subject: Installing libmysqlclient as shared library on OS X 10.3 Reply with quote

hi,

i'm trying to develop a front-end for mysql server using Qt on the Mac and Linux.

there is no problem installing the shared library on Linux as Redhat provides RPM packages.

the problem is on my Mac OS X. i tried to compile my app, but it can't find the drivers needed. then, i realize the only libraries provided by MySQL AB is libmysqlclient.a, a static library, which my Qt doesn't want.

after looking through the manuals and the docs here, the only way to get the shared library is to recompile mysql and install it from source.

so, is there any way to install the shared client library without recompiling from source? i hope i'll need not to uninstall the current installation of mysql, which can be messy as i have PHP using the current installation.

thanks in advanced!
Back to top
View user's profile Send private message
pamalite



Joined: 31 Jul 2004
Posts: 3

PostPosted: Thu Feb 03, 2005 15:36    Post subject: Found the solution after almost a day of search... Reply with quote

after almost a day of googling with different kinds of queries, i finally stumble upon the solution to solve this problem at http://lists.trolltech.com/qt-interest/2004-03/thread00628-0.html

all i need to do is to add "-lmysqlclient" flag during qmake... so... instead of

> qmake -o Makefile "INCLUDEPATH+=/usr/local/mysql/include" "LIBS+=-L/usr/local/mysql/lib" mysql.pro

it should be

> qmake -o Makefile "INCLUDEPATH+=/usr/local/mysql/include" "LIBS+=-L/usr/local/mysql/lib -lmysqlclient" mysql.pro

according to that mailing list, it is a bug in the Qt project file.
Back to top
View user's profile Send private message
unistein



Joined: 19 Sep 2005
Posts: 1
Location: Switzerland

PostPosted: Mon Sep 19, 2005 9:13    Post subject: Re: Installing libmysqlclient as shared library on OS X 10.3 Reply with quote

pamalite wrote:
after looking through the manuals and the docs here, the only way to get the shared library is to recompile mysql and install it from source.

so, is there any way to install the shared client library without recompiling from source? i hope i'll need not to uninstall the current installation of mysql, which can be messy as i have PHP using the current installation.

I had no need to uninstall the current installation when I compiled libmysqlclient.dylib from source. Just change to the libmysql directory before the "make install" step.

See my blog for more details.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Entropy.ch Discussion Forums Forum Index -> MySQL on Mac OS X All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group