I'm using Connector C++ 1.1.3 on Win 8 with VS 2010 Express.
For my debug build in Linker->General->Additional Library Directories I have: C:\Program Files\MySQL\Connector C++ 1.1.3\lib\debug
In Linker->Input I have: mysqlcppconn.lib
I get linker error: Server.obj : error LNK2019: unresolved external symbol _get_driver_instance referenced in function "public: bool __thiscall Server::Init(void)" (?Init@Server@@QAE_NXZ)
I have boost in additional include directorys : C:\Users\MyName\Downloads\boost_1_55_0\boost_1_55_0
I would assume get_driver_instance() is defined in the mysqlcppconn.lib.
#include <cppconn/driver.h>
#include <cppconn/exception.h>
#include <cppconn/resultset.h>
#include <cppconn/statement.h>
class Server
{
private:
sql::Driver* sqlDriver;
sql::Connection* sqlConn;
public:
bool Init();
};
bool Server::Init()
{
sqlDriver = get_driver_instance();
return true;
}
I know there are a bunch of topics on this but nothing I've tried has solved it. I haven't written all the things I've tried down as there are a bunch of things.
sqlDriver = sql::mysql::get_driver_instance();
– Jigsore