Der Treiber sollte erstmal als Plugin kompiliert werden dazu führe ich lt. QT Assistant - angepasst auf meine Install-Umgebung folgendes auf Windows-Kommandozeile aus:
cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake -o Makefile "INCLUDEPATH+=C:\Programme\MySQL\MySQL Server 5.0\include" "LIBS+=C:\Programme\MySQL\MySQL Server 5.0\lib\opt\libmysql.lib" mysql.pro
make
folgende Fehlermeldung erhalte ich dann:
mingw32-make -f Makefile.Debug all
mingw32-make[1]: Entering directory `C:/Qt/4.2.1/src/plugins/sqldrivers/mysql'
g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_
CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_COR
E_LIB -DQT_THREAD_SUPPORT -I"C:/Qt/4.2.1/include/QtCore" -I"C:/Qt/4.2.1/include/
QtCore" -I"C:/Qt/4.2.1/include/QtSql" -I"C:/Qt/4.2.1/include/QtSql" -I"C:/Qt/4.2
.1/include" -I"c:\Programme\MySQL\MySQL" -I"Server" -I"5.0\include" -I"C:/Qt/4.2
.1/include/ActiveQt" -I"tmp\moc\debug_shared" -I"." -I"..\..\..\..\mkspecs\win32
-g++" -o tmp\obj\debug_shared\main.o main.cpp
In file included from ../../../sql/drivers/mysql/qsql_mysql.h:34,
from main.cpp:26:
./mysql.h:57:23: mysql_com.h: No such file or directory
./mysql.h:58:24: mysql_time.h: No such file or directory
./mysql.h:59:27: mysql_version.h: No such file or directory
./mysql.h:60:21: typelib.h: No such file or directory
./mysql.h:62:70: my_list.h: No such file or directory
In file included from ../../../sql/drivers/mysql/qsql_mysql.h:34,
from main.cpp:26:
./mysql.h:102: error: use of enum `enum_field_types' without previous declaratio
n
./mysql.h:102: error: ISO C++ forbids declaration of `type' with no type
./mysql.h:131:22: my_alloc.h: No such file or directory
./mysql.h:138: error: `MEM_ROOT' does not name a type
./mysql.h:242: error: `NET' does not name a type
./mysql.h:248: error: `MEM_ROOT' does not name a type
./mysql.h:267: error: `SCRAMBLE_LENGTH' was not declared in this scope
./mysql.h:284: error: ISO C++ forbids declaration of `LIST' with no type
./mysql.h:284: error: expected `;' before '*' token
./mysql.h:311: error: `MEM_ROOT' does not name a type
./mysql.h:337: error: `NET' does not name a type
./mysql.h:503: error: use of enum `mysql_enum_shutdown_level' without previous d
eclaration
./mysql.h:503: error: ISO C++ forbids declaration of `shutdown_level' with no ty
pe
./mysql.h:510: error: use of enum `enum_mysql_set_option' without previous decla
ration
./mysql.h:510: error: ISO C++ forbids declaration of `option' with no type
./mysql.h:655: error: use of enum `enum_field_types' without previous declaratio
n
./mysql.h:655: error: ISO C++ forbids declaration of `buffer_type' with no type
./mysql.h:667: error: expected `;' before '(' token
./mysql.h:678: error: `MEM_ROOT' does not name a type
./mysql.h:679: error: `LIST' does not name a type
./mysql.h:707: error: `MYSQL_ERRMSG_SIZE' was not declared in this scope
./mysql.h:708: error: `SQLSTATE_LENGTH' was not declared in this scope
./mysql.h:749: error: use of enum `enum_server_command' without previous declara
tion
./mysql.h:755: error: ISO C++ forbids declaration of `command' with no type
mingw32-make[1]: *** [tmp\obj\debug_shared\main.o] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/4.2.1/src/plugins/sqldrivers/mysql'
mingw32-make: *** [debug-all] Error 2
C:\Qt\4.2.1\src\plugins\sqldrivers\mysql>
Im Pfad c:\Qt\4.2.1\plugins\sqldrivers\ befindet sich auch nichts von mysql. Mein kleines Testprogramm sagt mir auch, dass er den Treiber nicht findet.
Wer kann helfen?
Danke im Voraus[/code]
QT 4.2.1 und MYSQL Treiber alles mit Ecipse
-
Christian81
- Beiträge: 7319
- Registriert: 26. August 2004 14:11
- Wohnort: Bremen
- Kontaktdaten:
-
Christian81
- Beiträge: 7319
- Registriert: 26. August 2004 14:11
- Wohnort: Bremen
- Kontaktdaten:
Ich versuchte es mit der "Anleitung" aus dem QT-Assistenten s.o. Dann gab es erstmal den Crash mit den Leerzeichen in der Pfadangabe und als das gelöst war, erstellte er zwar die ...a-Datei nicht aber die ...dll. Kann also der Frage nach dem "statischen Kompilieren" nicht wirklich verstehen?
Danke nochmal für alle Mühen.
Danke nochmal für alle Mühen.
QT 4.2.1 und MYSQL Treiber alles mit Ecipse
Im Qt-Pfad /plugins/sqldrivers sind nach einigem Probieren .a und qsqlmysql.dll und qsqlmysqld.dll drin. Jedoch besteht das Problem, dass der Treiber nicht gefunden wird, weiter. Ich arbeite mit Eclipse, sind dort noch besondere Einstellungen nötig. Ich habe auch schon Includepfade dahingehend gesetzt, auch das half nicht. Auch configure ... und mingw32-make habe ich mehrfach ausgeführt.
Was kann ich nun noch tun damit der Treiber erreichbar ist?
Was kann ich nun noch tun damit der Treiber erreichbar ist?
-
Christian81
- Beiträge: 7319
- Registriert: 26. August 2004 14:11
- Wohnort: Bremen
- Kontaktdaten:
Wenn es ein Plugin ist muss man es nicht linken - das ist nunmal die Eigenschaft eines Plugins... Siehe auch http://doc.trolltech.com/4.2/plugins-howto.html
MfG Christian
'Funktioniert nicht' ist keine Fehlerbeschreibung
'Funktioniert nicht' ist keine Fehlerbeschreibung