[Qt-interest] Using MySQL Libraries on MAC
Samuel Gaist
samuel.gaist at cinetis.ch
Thu Sep 30 10:05:26 CEST 2010
On 29 sept. 10, at 16:38, David Villalobos Cambronero wrote:
> Dear all,
>
> I'm trying to compile my app on MAC. It uses the MySQL Headers and
> Libraries. I really new on MAC, but I think all the required files
> are there, headers files are installed on /opt/local/include/mysql5/
> mysql; library files are present on /opt/local/lib/mysql5/mysql. But
> when I try to compile I got the error: library not found for -
> llibmysqlclient.a Both paths are added to my .pro file.
>
> Any idea of what I'm doing wrong?
>
> Regards
> ---
> David
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
Hello,
You are using the wrong name it should be -lmysqclient, and don't
forget that if you want to use the static version (it seems so looking
at the library name you used) you should not have the the dynamic
libraries in the same directories, they will be picked up by default
by the linker.
There are two solution for that:
1. Move the static version in another directory and point the linker
to them (with -L)
2. Make a symbolic link to the library and use the name of that link:
i.e. ln -s libmysqlclient.a libmysqlclient_s.a and in the pro file: -
lmysqlclient_s
Hope this helps
Samuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1587 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100930/1db0e14b/attachment.bin
More information about the Qt-interest-old
mailing list