After spending a whole day trying to fix this problem I finally got it to work. After a lot of googling it seems like many people also have the same problem so I thought I would share my experience with this problem.
Error 1 error LNK2001: unresolved external symbol _get_driver_instance
First I downloaded the 64bit version of the latest MSI installer, which didn't work for me no matter what I linked to. I'm going to keep this straight forward so here is the things I made to make it work:
1.) Download this version of the C++ Connector
http://dev.mysql.com/downloads/mirror.php?id=393791
2.) Download boost from boost.org
3.) Extract it and add setup your include directories like this: (C/C++ General)
path\mysql-connector-c++-noinstall-1.1.0-win32\include\cppconn;
path\mysql-connector-c++-noinstall-1.1.0win32\include;
path\boost_1_46_1;
4.) Add the lib folder to your Additional Library Directories (Linker/General)
path\mysql-connector-c++-noinstall-1.1.0-win32\lib
5.) Add these to your Additional Dependencies (Linker/Input)
mysqlcppconn.lib;
libmysql.lib;
6.) Move mysqlcppconn.dll to your project folder
All these are things you can read here : http://dev.mysql.com/doc/refman/5.1/en/connector-cpp-apps-windows-visual-studio.html
I think the main thing that made it work for me was that I downloaded another release instead of the MSI installer.
I'm running Windows 7 with Visual Studio 2010.
I hope this help someone!
Cheers,
simpler
Error 1 error LNK2001: unresolved external symbol _get_driver_instance
First I downloaded the 64bit version of the latest MSI installer, which didn't work for me no matter what I linked to. I'm going to keep this straight forward so here is the things I made to make it work:
1.) Download this version of the C++ Connector
http://dev.mysql.com/downloads/mirror.php?id=393791
2.) Download boost from boost.org
3.) Extract it and add setup your include directories like this: (C/C++ General)
path\mysql-connector-c++-noinstall-1.1.0-win32\include\cppconn;
path\mysql-connector-c++-noinstall-1.1.0win32\include;
path\boost_1_46_1;
4.) Add the lib folder to your Additional Library Directories (Linker/General)
path\mysql-connector-c++-noinstall-1.1.0-win32\lib
5.) Add these to your Additional Dependencies (Linker/Input)
mysqlcppconn.lib;
libmysql.lib;
6.) Move mysqlcppconn.dll to your project folder
All these are things you can read here : http://dev.mysql.com/doc/refman/5.1/en/connector-cpp-apps-windows-visual-studio.html
I think the main thing that made it work for me was that I downloaded another release instead of the MSI installer.
I'm running Windows 7 with Visual Studio 2010.
I hope this help someone!
Cheers,
simpler