[Qt-interest] QT 4.7.1 on Windows + MSVC2010 + MySQL
Constantin Makshin
cmakshin at gmail.com
Sun Nov 21 19:49:21 CET 2010
On Sunday 21 November 2010 20:39:43 newsletters at philippberger.de wrote:
> Hello everybody,
>
> this is my first post to this list, therefore please tell me should I have
> violated a rule :)
Hello and welcome. ;)
> I started from qt-everywhere-opensource-src-4.7.1.tar.gz,
> openssl-1.0.0b.tar.gz, sqlite-amalgamation-3_7_3.zip and
> mysql-noinstall-5.1.53-win32.zip.
> Steps I took:
> 1. Extract openssl, build it following the instructions with MSVC2010 and
> NASM 2.10 to C:\QT\openssl
> 2. Extract mysql to E:\QT\mysql-build
> 3. Extract SQLite to E:\QT\sqlite
> 4. Extract qt to E:\QT\4.7.1-opensource, start a MSVC2010 x86 Build
> console and configure it with:
>
> Configure.exe -debug-and-release -opensource -shared -ltcg -no-fast
> -exceptions -accessibility -stl -qt-sql-sqlite -plugin-sql-sqlite
> -qt-sql-mysql -plugin-sql-mysql -platform win32-msvc2010 -qt-zlib -qt-gif
> -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -dsp -vcproj
> -incredibuild-xge -plugin-manifests -qmake -process -rtti -mmx -sse -sse2
> -openssl-linked -multimedia -webkit -script -scripttools -declarative
> -qt-style-windows -qt-style-windowsxp -qt-style-windowsvista
> -qt-style-plastique -qt-style-cleanlooks -qt-style-motif -qt-style-cde
> -native-gestures -mp -I "E:\QT\mysql-5.1.53-win32\include" -L
> "E:\QT\mysql-5.1.53-win32\lib\opt" -I "E:\QT\openssl\include" -L
> "E:\QT\openssl\lib" -I "E:\QT\sqlite"
>
> Do I need -qt-sql-mysql AND -plugin-sql-mysql? These options are not very
> well documented.
No, you don't need to specify both options.
"-qt-sql-*" means SQL driver will be compiled directly into QtSql4.dll. The result is that it's always available, no matter whether an application wants it or not.
"-plugin-sql-*" means the driver will be built as a plugin and loaded on-demand, i.e. when an application requests it.
The latter approach obviously requires less system resources (unused libraries are not loaded) and allows more flexible installation/distribution variants.
> But after configure run through nmake fails with a message about 50
> unresolved externals related to mysql. Do I need an additional command
> like "-llibmysql"? And this problem is not related to the MinGW problems
> (or at least I think so^^).
You don't need to specify "-llibmysql" explicitly because it's automatically done by the MySQL driver project file.
What looks strange to me is that you extracted MySQL to one directory, but in configuration options specified another directory.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101121/114604a9/attachment.bin
More information about the Qt-interest-old
mailing list