System: Win8 64-bit
MySQL 5.7 32
The original project was debug 32-bit compiled
Later changed to release 64-bit result compilation yes, external symbols that cannot be resolved when the connection is made.
Workaround:
1 Download x64-bit DLL, lib file download link: Click to open the link
2 copy Libmysql64.lib and Libmysql64.dll to the database installation directory, which is the original Libmysql.lib sibling directory
3 in my program Lib is in this way. So I changed it here to Libmysql64.lib.
#pragma comment (lib, "Libmysql64.lib")
If you are adding a project attribute, change it to Libmysql64.lib.
4 after the compilation is passed, the 64-bit libmysql64.dll will be placed in the project catalog X64/debug (or C:/windows/system32
5 Other:
The include Lib for the database is added to the project properties.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
x64 release mode MySQL compile connection error resolution