当前位置: 代码迷 >> QT开发 >> 高分关于编译mysql驱动的异常
  详细解决方案

高分关于编译mysql驱动的异常

热度:50   发布时间:2016-04-25 04:33:02.0
高分求助关于编译mysql驱动的错误
1、按照大家普遍讲的方法编译

2、我安装mysql后,编辑.pro文件
  INCLUDEPATH+="D:\MySQL\Connector C 6.0.2\include"
LIBS+="D:\MySQL\Connector C 6.0.2\lib\opt\libmysql.lib"

3、编译通过,链接时出现这么多错误:
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_fetch_field@4,该符号
在函数 "public: bool __thiscall QMYSQLResultPrivate::bindInValues(void)" (?bindI
nValues@QMYSQLResultPrivate@@QAE_NXZ) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_num_fields@4,该符号在
函数 "public: bool __thiscall QMYSQLResultPrivate::bindInValues(void)" (?bindInV
alues@QMYSQLResultPrivate@@QAE_NXZ) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_stmt_result_metadata@4
,该符号在函数 "public: bool __thiscall QMYSQLResultPrivate::bindInValues(void)"
 (?bindInValues@QMYSQLResultPrivate@@QAE_NXZ) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_stmt_close@4,该符号在
函数 "protected: void __thiscall QMYSQLResult::cleanup(void)" (?cleanup@QMYSQLRe
sult@@IAEXXZ) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_store_result@4,该符号
在函数 "protected: void __thiscall QMYSQLResult::cleanup(void)" (?cleanup@QMYSQL
Result@@IAEXXZ) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_next_result@4,该符号
在函数 "protected: void __thiscall QMYSQLResult::cleanup(void)" (?cleanup@QMYSQL
Result@@IAEXXZ) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_free_result@4,该符号
在函数 "protected: void __thiscall QMYSQLResult::cleanup(void)" (?cleanup@QMYSQL
Result@@IAEXXZ) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_fetch_row@4,该符号在
函数 "protected: virtual bool __thiscall QMYSQLResult::fetch(int)" (?fetch@QMYSQ
LResult@@MAE_NH@Z) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_data_seek@12,该符号在
函数 "protected: virtual bool __thiscall QMYSQLResult::fetch(int)" (?fetch@QMYSQ
LResult@@MAE_NH@Z) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_stmt_fetch@4,该符号在
函数 "protected: virtual bool __thiscall QMYSQLResult::fetch(int)" (?fetch@QMYSQ
LResult@@MAE_NH@Z) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_stmt_data_seek@12,该
符号在函数 "protected: virtual bool __thiscall QMYSQLResult::fetch(int)" (?fetch
@QMYSQLResult@@MAE_NH@Z) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_stmt_errno@4,该符号在
函数 "class QSqlError __cdecl qMakeStmtError(class QString const &,enum QSqlErro
r::ErrorType,struct st_mysql_stmt *)" (?qMakeStmtError@@YA?AVQSqlError@@ABVQStri
ng@@W4ErrorType@1@PAUst_mysql_stmt@@@Z) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_stmt_error@4,该符号在
函数 "class QSqlError __cdecl qMakeStmtError(class QString const &,enum QSqlErro
r::ErrorType,struct st_mysql_stmt *)" (?qMakeStmtError@@YA?AVQSqlError@@ABVQStri
ng@@W4ErrorType@1@PAUst_mysql_stmt@@@Z) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_num_rows@4,该符号在函
数 "protected: virtual bool __thiscall QMYSQLResult::fetchLast(void)" (?fetchLas
t@QMYSQLResult@@MAE_NXZ) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_stmt_num_rows@4,该符
号在函数 "protected: virtual bool __thiscall QMYSQLResult::fetchLast(void)" (?fe
tchLast@QMYSQLResult@@MAE_NXZ) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_fetch_lengths@4,该符
号在函数 "protected: virtual class QVariant __thiscall QMYSQLResult::data(int)"
(?data@QMYSQLResult@@MAE?AVQVariant@@H@Z) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_fetch_field_direct@8,
该符号在函数 "protected: virtual bool __thiscall QMYSQLResult::reset(class QStri
ng const &)" (?reset@QMYSQLResult@@MAE_NABVQString@@@Z) 中被引用
qsql_mysql.obj : error LNK2019: 无法解析的外部符号 _mysql_affected_rows@4,该符
号在函数 "protected: virtual bool __thiscall QMYSQLResult::reset(class QString c
onst &)" (?reset@QMYSQLResult@@MAE_NABVQString@@@Z) 中被引用
  相关解决方案