QT 4.2.1 und MYSQL Treiber alles mit Ecipse
Verfasst: 23. Oktober 2006 11:59
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]
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]