I get an unresolved external character error when binding my code with MySQL Connector C ++ 1.1.0.
Here is the error message:
6>database.lib(db_manager.obj) : error LNK2019: unresolved external symbol "class sql::mysql::MySQL_Driver * __cdecl sql::mysql::get_driver_instance(void)" ( ?get_driver_instance@mysql @ sql@ @ YAPAVMySQL_Driver@12 @XZ) referenced in function "class sql::mysql::MySQL_Driver * __cdecl sql::mysql::get_mysql_driver_instance(void)" ( ?get_mysql_driver_instance@mysql @ sql@ @ YAPAVMySQL_Driver@12 @XZ)
I used dumpbin to get a list of characters in mysqlconn-static.lib and found a similar character:
COMDAT; sym= "class sql::mysql::MySQL_Driver * __cdecl sql::mysql::get_driver_instance(void)" ( ?get_driver_instance@mysql @ sql@ @ YAPEAVMySQL_Driver@12 @XZ)
When these two lines are lined up, the difference looks like this:
( ?get_driver_instance@mysql @ sql@ @ YAPEAVMySQL_Driver@12 @XZ) ( ?get_driver_instance@mysql @ sql@ @ YAPAVMySQL_Driver@12 @XZ)
What is the difference in name header between YAPEAV and YAPAV ?
I have an idea that my problem is with inconsistencies between the MySQL Connector library and the way I build my code.
I searched the Internet and found a bug in MySQL Connector 1.1.0, but was changed to "not a bug".
I am using Visual Studio 2010 build for a 32-bit target using a 64-bit platform.
MySQL Connector C ++ - version 1.1.0.
source share