Hello I'm getting this linking error on this line using mysql's connector C++ API.
//Initalize mysql connector C++
driver = sql::mysql::get_mysql_driver_instance();
Error:
LNK2001: unresolved external symbol "__declspec(dllimport) class sql::mysql::MySQL_Driver * __cdecl sql::mysql::get_mysql_driver_instance(void)" (__imp_?get_mysql_driver_instance@mysql@sql@@YAPAVMySQL_Driver@12@XZ)
How my headers are
//...
#include <tchar.h>
#include <string.h>
#include <vector>
#include <stdexcept>
/* MySQL Connector/C++ specific headers */
#include <mysql_connection.h>
#include <mysql_driver.h>
#include <cppconn/driver.h>
#include <cppconn/connection.h>
#include <cppconn/statement.h>
#include <cppconn/prepared_statement.h>
#include <cppconn/resultset.h>
#include <cppconn/metadata.h>
#include <cppconn/resultset_metadata.h>
#include <cppconn/exception.h>
#include <cppconn/warning.h>
And yes I have "mysqlcppconn.lib" added and my project is in release mode. I'm I forgetting something to do with the API?
I downloaded the API from the installer from Mysql directly if that helps a little.
Thanks, Andrew