[Qt-interest] QT 4.7.1 on Windows + MSVC2010 + MySQL

newsletters at philippberger.de newsletters at philippberger.de
Sun Nov 21 18:39:43 CET 2010


Hello everybody,

this is my first post to this list, therefore please tell me should I have
violated a rule :)

I've used QT for about 3 years now and I love it. It is plain and simple
to use, the documentation is great and there are many good communities for
getting help. But one thing annoyed me whenever I tried to compile a new
version. But first things first, my setup:

3 computers on which I develop:
 - Windows 7 64bit, Visual Studio 2010 Ultimate, Intel C++ Compiler Suite
 - Windows 7 32bit, Visual Studio 2010 Ultimate
 - Windows XP 32bit SP3, Visual Studio 2008

Configuring and compiling works just fine, BUT only without the MySQL plugin.
I've done both static and shared compiles of QT, but I never got MySQL to
compile. The documentation on how to build QT with MySQL support S*CKS, I
hate to say that but the provided information is simply not enough. The
example in the documentation is on how to build the mysql plugin at a
later date, but no hint for building it with everything else from source.

I would like to collect such information and publish it in some forums and
perhaps even on the QT Documentation, mainly because I need it to work but
there are many others out there who tried building it and failed.

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.
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^^).

If you need more information or just want to tell me that I am dumb (like
many did on QT forums), just mail me:)

Thank you very much in advance,

Philipp Berger




More information about the Qt-interest-old mailing list