Bug #56910 the file "mysqlcppconn.dll" in mysql Connector/C++ 1.1 did not work.
Submitted: 21 Sep 2010 22:57 Modified: 22 Sep 2010 18:15
Reporter: sonly strong Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / C++ Severity:S1 (Critical)
Version:1.1 OS:Windows
Assigned to: CPU Architecture:Any

[21 Sep 2010 22:57] sonly strong
Description:
I first download the Connector/C++ 1.1 
Found the function export from the "mysqlcppconn.dll" not correct.
I use the "Dependency Walker"(depends) to check the function that found:

only three function export correct.

get_driver_instance
get_driver_instance_by_name
sql_mysql_get_driver_instance

I download the Connector/C++ 1.1 source file, install Boost, Cmake,complier with vs2008.
It did not work.

____________________export function lists_______________________________
??0Connection@sql@@QAE@XZ
??0Driver@sql@@QAE@ABV01@@Z
??0Driver@sql@@QAE@XZ
??0InvalidArgumentException@sql@@QAE@ABU01@@Z
??0InvalidArgumentException@sql@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
??0InvalidInstanceException@sql@@QAE@ABU01@@Z
??0InvalidInstanceException@sql@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
??0MethodNotImplementedException@sql@@QAE@ABU01@@Z
??0MethodNotImplementedException@sql@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
??0MySQL_Connection@mysql@sql@@QAE@PAVDriver@2@AAVNativeConnectionWrapper@NativeAPI@12@AAV?$map@VSQLString@sql@@V?$variant@HN_NVSQLString@sql@@Uvoid_@0detail@boost@@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@@boost@@U?$less@VSQLString@sql@@@std@@V?$allocator@U?$pair@$$CBVSQLString@sql@@V?$variant@HN_NVSQLString@sql@@Uvoid_@0detail@boost@@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@@boost@@@std@@@6@@std@@@Z
??0MySQL_Connection@mysql@sql@@QAE@PAVDriver@2@AAVNativeConnectionWrapper@NativeAPI@12@ABVSQLString@2@22@Z
??0MySQL_Driver@mysql@sql@@QAE@ABVSQLString@2@@Z
??0MySQL_Driver@mysql@sql@@QAE@XZ
??0NonScrollableException@sql@@QAE@ABU01@@Z
??0NonScrollableException@sql@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
??0SQLException@sql@@QAE@ABV01@@Z
??0SQLException@sql@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z
??0SQLException@sql@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0H@Z
??0SQLException@sql@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
??0SQLException@sql@@QAE@XZ
??0SQLString@sql@@QAE@ABV01@@Z
??0SQLString@sql@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
??0SQLString@sql@@QAE@PBDI@Z
??0SQLString@sql@@QAE@QBD@Z
??0SQLString@sql@@QAE@XZ
??1Connection@sql@@UAE@XZ
??1Driver@sql@@MAE@XZ
??1InvalidArgumentException@sql@@UAE@XZ
??1InvalidInstanceException@sql@@UAE@XZ
??1MethodNotImplementedException@sql@@UAE@XZ
??1MySQL_Connection@mysql@sql@@UAE@XZ
??1MySQL_Driver@mysql@sql@@UAE@XZ
??1NonScrollableException@sql@@UAE@XZ
??1SQLException@sql@@UAE@XZ
??1SQLString@sql@@QAE@XZ
??2SQLException@sql@@KAPAXI@Z
??4Driver@sql@@QAEAAV01@ABV01@@Z
...
?substr@SQLString@sql@@QBE?AV12@II@Z
?threadEnd@MySQL_Driver@mysql@sql@@UAEXXZ
?threadInit@MySQL_Driver@mysql@sql@@UAEXXZ
get_driver_instance
get_driver_instance_by_name
sql_mysql_get_driver_instance
_________________________________________________________________________

How to repeat:
use the dll mysqlcppconn.dll mysqlcppconn.lib
It did not work
[22 Sep 2010 18:15] Lawrenty Novitsky
Hi Sonly. I don't really understand that is wrong here. Yes, only 3 functions are exported. That is intended to be so. you get driver object using them. Driver object can provide you with connection object, and so on...
I'm gonna set this report as "not a bug". You may change that back and explain what is the problem.
[12 May 2011 11:34] Daryl H
I am encountering this problem with Visual C++ 2010 Express and MySQL Connector C++ 1.1.0
I have tried both opt and debug versions of mysqlcppconn.lib .
I have defined preprocessor symbols
_WIN32
_DEBUG
mysqlcppconn_EXPORTS
(and just for completeness)
CPPCONN_PUBLIC_FUNC=__declspec(dllexport) 

1>test.obj : error LNK2028: unresolved token (0A000416) "extern "C" class sql::Driver * __cdecl get_driver_instance(void)" (?get_driver_instance@@$$J0YAPAVDriver@sql@@XZ) referenced in function "private: void __clrcall test::Form1::Form1_Load(class System::Object ^,class System::EventArgs ^)" (?Form1_Load@Form1@test@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)

test.obj : error LNK2019: unresolved external symbol "extern "C" class sql::Driver * __cdecl get_driver_instance(void)" (?get_driver_instance@@$$J0YAPAVDriver@sql@@XZ) referenced in function "private: void __clrcall test::Form1::Form1_Load(class System::Object ^,class System::EventArgs ^)" (?Form1_Load@Form1@test@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)
[12 May 2011 12:01] Daryl H
further to my last post, I dumped the (opt) library and found this entry which is slightly different from the error message  :

Version      : 0
  Machine      : 8664 (x64)
  TimeDateStamp: 4C8A00A7 Fri Sep 10 02:55:51 2010
  SizeOfData   : 0000004A
  DLL name     : mysqlcppconn.dll
  Symbol name  : ?get_driver_instance@mysql@sql@@YAPEAVMySQL_Driver@12@XZ (class sql::mysql::MySQL_Driver * __cdecl sql::mysql::get_driver_instance(void))
  Type         : code
  Name type    : name
  Hint         : 89
  Name         : ?get_driver_instance@mysql@sql@@YAPEAVMySQL_Driver@12@XZ