| View previous topic :: View next topic |
| Author |
Message |
pamalite
Joined: 31 Jul 2004 Posts: 3
|
Posted: Wed Feb 02, 2005 3:23 Post subject: Installing libmysqlclient as shared library on OS X 10.3 |
|
|
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 |
|
 |
pamalite
Joined: 31 Jul 2004 Posts: 3
|
Posted: Thu Feb 03, 2005 15:36 Post subject: Found the solution after almost a day of search... |
|
|
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 |
|
 |
unistein
Joined: 19 Sep 2005 Posts: 1 Location: Switzerland
|
Posted: Mon Sep 19, 2005 9:13 Post subject: Re: Installing libmysqlclient as shared library on OS X 10.3 |
|
|
| 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 |
|
 |
|