Problem Description:
Configuration in QT
1) Libs+=-ld:\mysql\mysql_5.6.24_winx64\lib-llibmysql
2) mymysql.h in the header file
#include <windows.h>
#include <D:/mySQL/mysql_5.6.24_winx64/include/mysql.h>
The error appears as shown
Before the study of a long time to find a lot of information is not resolved, by chance to see a sentence "qt link mysql always error: undefined reference to ' [email protected] ', found to be driving problems, because the QT is written 32-bit program, The DLL introduced is 64-bit ". My computer is 64 bit, the use of MySQL is also, so I downloaded the mysql-connector-c-6.1.6-win-32 on the MySQL website, with the Lib problem in this solution. Later I looked carefully at the QT information, is indeed 32 bit ...
Specific steps:
1. Link "LIBS + =-ld:\mysql\mysql_connector_32\mysql_connector_32\lib-llibmysql" into the. Pro file
2.mymysql.h the head file or my original MySQL path is "#include" d:/mysql/mysql_5.6.24_winx64/include/mysql.h "
MySQL compilation error problem in QT