回复: Qt4 OpenSource for mingw中编译MySQL驱动
#26 [doit4 06-19 16:14]
D:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot fin
d -llibmysql
是怎么回事啊,老大
#27 [daimon0316 08-12 13:40]
晕晕晕,折腾了好久原来是
qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE" "LIBS+=C:\MYSQL\LIB\OPT\LIBMYSQL.LIB" mysql.pro
这句中的路径大小写不匹配
#28 [masprb 09-10 11:36]
将libmysql.lib拷贝到qt\lib即可编译成功
#29 [xcf007 11-12 16:38]
make出来错误,不成功,郁闷
#30 [xcf007 11-12 17:09]
c:/MYSQL/INCLUDE/mysql.h:800: error: `my_ulonglong' has not been declared
c:/MYSQL/INCLUDE/mysql.h:800: error: ISO C++ forbids declaration of `offset' wit
h no type
c:/MYSQL/INCLUDE/mysql.h:801: error: expected constructor, destructor, or type c
onversion before "mysql_stmt_num_rows"
c:/MYSQL/INCLUDE/mysql.h:802: error: expected constructor, destructor, or type c
onversion before "mysql_stmt_affected_rows"
c:/MYSQL/INCLUDE/mysql.h:803: error: expected constructor, destructor, or type c
onversion before "mysql_stmt_insert_id"
c:/Program Files/Microsoft Visual Studio/VC98/include/ostream: In member functio
n `std::basic_ostream& std::basic_ostream::put(_E) ':
c:/Program Files/Microsoft Visual Studio/VC98/include/ostream:373:instantiate
d from here
c:/Program Files/Microsoft Visual Studio/VC98/include/ostream:235: error: 'struc
t std::basic_streambuf' has no member named 'sput
c'
c:/Program Files/Microsoft Visual Studio/VC98/include/ostream: In member functio
n `std::basic_ostream& std::basic_ostream::put(_E) ':
c:/Program Files/Microsoft Visual Studio/VC98/include/ostream:379:instantiate
d from here
c:/Program Files/Microsoft Visual Studio/VC98/include/ostream:235: error: 'struc
t std::basic_streambuf' has no member named
'sputc'
c:/Program Files/Microsoft Visual Studio/VC98/include/xstring: In member functio
n `void std::basic_string::resize(int) ':
../../../../include/QtCore/../../src/corelib/tools/qstring.h:995:instantiated
from here
c:/Program Files/Microsoft Visual Studio/VC98/include/xst ..