PDA

View Full Version : Qt 4.2.3 with MSVC 2005 and MySQL



whitefurrows
23rd April 2007, 23:16
Hi,

how can i compile Qt 4.2.3 with MSVC 2005 and MySQL?

I use MySQL 5.0.3.7 without installer from:
http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-noinstall-5.0.37-win32.zip/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/

I configure Qt with this command:
configure -platform win32-msvc2005 -I C:\MySQLl\include -L C:\MySQL\lib\opt -l mysql -qt-sql-mysql -qt-sql-sqlite -debug-and-release

and try to build Qt with nmake, but i get an error LINK : fatal error LNK1181: cannot open input file 'mysql.lib'

I don't have mysql.lib in my MySQL directory. Where can i Download mysql.lib or build it?

Thanks in advance,

Whitefurrows

luf
24th April 2007, 10:30
Hi

Haven't tried this myself, but did you download the source and compile the source or did you download the server and started it?

you can look at this:
http://www.mobiustech.net/qtsql/
Where the source is provided and might give you a few leads.

You probably have looked at:
http://doc.trolltech.com/4.2/sql-driver.html#qmysql-for-mysql-4-and-higher ?

Some more info that seems to give details on what might be the problem:
http://lists.trolltech.com/qt-interest/2006-02/thread00199-0.html

Have a look here:
http://lists.trolltech.com/qt-interest/2006-04/thread00090-0.html
See message 7.

Depending on whether you use MSVC or MinGW for compilation, the last one might give you some hints.

cheers,
Leif

whitefurrows
24th April 2007, 22:08
Hi,

sorry, i don't have find a answer in the links above!

i have download MySQL 5.0.3.7 without installer (mysql-noinstall-5.0.37-win32.zip) and extract to my local drive "C:\MySQL\"

The Qt (qt-win-commercial-src-4.2.3.zip) is available at "C:\Qt_4.2.3\"

Qt is configure with this command:
configure -platform win32-msvc2005 -I C:\MySQLl\include -L C:\MySQL\lib\opt -l mysql -qt-sql-mysql -qt-sql-sqlite -debug-and-release

I compile the src with msvc2005 an nmake (i don't use MinGW), and i get an error LINK : fatal error LNK1181: cannot open input file 'mysql.lib'

The "mysql.lib" is not available in my MySQL directory and that is the problem!

What can i do?

Thanks in advance,

Whitefurrows

whitefurrows
3rd May 2007, 11:03
Hi,

does anyone has gotten Qt4.2.3 to build on win32 an msvc2005 with MySQL support? Can somebody else post the right configuration?

Thanks in advance

whitefurrows
3rd May 2007, 17:32
Thanks to all the problem was "-l mysql" the right option is "-l libmysql"