MySQL Treiber für Qt compilieren

Alles rund um die Programmierung mit Qt
Antworten
Tschebychev
Beiträge: 5
Registriert: 10. November 2012 17:31

MySQL Treiber für Qt compilieren

Beitrag von Tschebychev »

Ich verwende Qt 4.8.3 und den Visual Studio 10 Compiler

nachdem ich, wie beschrieben in den offiziellen Dokus
cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\MySQL Server <version>\lib\opt\libmysql.lib" mysql.pro
nmake
ausgeführt habe

bekomme ich einige Fehlermeldungen. Den Aufruf habe ich über die Visual Studio Prompt durchgeführt.
C:\Qt\4.8.3\src\plugins\sqldrivers\mysql>nmake

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" -
f Makefile.Debug

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Qt\4.8.3\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO
_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CO
RE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SS
E2 -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtS
ql" -I"..\..\..\..\include" -I"c:\MySQL\MySQL" -I"Server" -I"5.1\include" -I"..\
..\..\..\include\ActiveQt" -I"debug" -I"..\..\..\..\mkspecs\default" -D_MSC_VER=
1600 -DWIN32 ..\..\..\sql\drivers\mysql\qsql_mysql.cpp -o debug\qsql_mysql.moc
C:\Qt\4.8.3\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO
_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CO
RE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SS
E2 -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtS
ql" -I"..\..\..\..\include" -I"c:\MySQL\MySQL" -I"Server" -I"5.1\include" -I"..\
..\..\..\include\ActiveQt" -I"debug" -I"..\..\..\..\mkspecs\default" -D_MSC_VER=
1600 -DWIN32 ..\..\..\sql\drivers\mysql\qsql_mysql.h -o debug\moc_qsql_mysql.cpp

rc -D_DEBUG -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_CAST_TO_ASC
II -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_
HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THRE
AD_SUPPORT -fo debug\qsqlmysqld_resource.res qsqlmysqld_resource.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
Copyright (C) Microsoft Corporation. All rights reserved.

cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189
-DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FRO
M_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_
3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..
\..\..\include\QtCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\include" -I"
c:\MySQL\MySQL" -I"Server" -I"5.1\include" -I"..\..\..\..\include\ActiveQt" -I"d
ebug" -I"..\..\..\..\mkspecs\default" -Fodebug\ @C:\Users\B\AppData\Local\Temp\n
mB727.tmp
main.cpp
c:\qt\4.8.3\src\plugins\sqldrivers\mysql\../../../sql/drivers/mysql/qsql_mysql.h
(52) : fatal error C1083: Cannot open include file: 'mysql.h': No such file or d
irectory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

C:\Qt\4.8.3\src\plugins\sqldrivers\mysql>
Ich hab keine Ahnung was ich hier machen kann?!
Christian81
Beiträge: 7319
Registriert: 26. August 2004 14:11
Wohnort: Bremen
Kontaktdaten:

Re: MySQL Treiber für Qt compilieren

Beitrag von Christian81 »

Leerzeichen im Include-Pfad. Vershcieb die Header und Libraries von MySQL in einen Pfad ohne Leerzeichen.
MfG Christian

'Funktioniert nicht' ist keine Fehlerbeschreibung
Tschebychev
Beiträge: 5
Registriert: 10. November 2012 17:31

Re: MySQL Treiber für Qt compilieren

Beitrag von Tschebychev »

hab den Pfad von MySQL\MySQL Server 5.1 zu MySQL\MySQLServer umbennant. Works nice!
Antworten