[Qt-interest] Using MySQL Libraries on MAC

Samuel Gaist samuel.gaist at cinetis.ch
Mon Oct 4 09:37:03 CEST 2010


On 2 oct. 10, at 05:56, RPREMANAND RPREMANAND wrote:

> hi,
>    Im working with Qt for long time,currently Im working with  
> Database programming,I have issues compiling and installing sql  
> drivers,I have installed mysql service,but cant install qtsql  
> drivers,Can u help me with this issue,
>
> Thanks in advance,
> Prem Anand
>
>
> On 9/30/10, Samuel Gaist <samuel.gaist at cinetis.ch> wrote:
> 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
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>
>
>
> -- 
> Prem

Hello,
First thing, don't email me personally, write to the list so everyone  
can help.
I might be able to help you but you didn't provide any elements of  
information (Qt Version, sql database type, OS etc...) and nothing  
about your specific problem.

The first thing you should verify is that you correctly followed the  
instruction provided in the documentation for installing sql drivers:
http://doc.trolltech.com/4.7/sql-driver.html

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/20101004/27c0e39e/attachment.bin 


More information about the Qt-interest-old mailing list