I'm getting unresolved external symbol error when linking my code with MySQL Connector C++ 1.1.0.
Here's 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 symbols in the mysqlconn-static.lib and found a similar symbol:
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:
(?get_driver_instance@mysql@sql@@YAPEAVMySQL_Driver@12@XZ)
(?get_driver_instance@mysql@sql@@YAPAVMySQL_Driver@12@XZ)
What is the difference in Name Managling between YAPEAV
AND YAPAV
?
I have an idea that my issue is related to incompatiblities between the MySQL Connector library and how I'm building my code.
I searched the web and found a bug against MySQL Connector 1.1.0, but it was changed to "not a bug".
I am using Visual Studio 2010 compiling to a 32-bit target using a 64-bit platform.
The MySQL Connector C++ is version 1.1.0.