1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sql::SQLString::~SQLString(void)" (__imp_??1SQLString@sql@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sql::SQLString::SQLString(char const * const)" (__imp_??0SQLString@sql@@QAE@QBD@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class sql::mysql::MySQL_Driver * __cdecl sql::mysql::get_driver_instance(void)" (__imp_? 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)
1>C:\Users\Mantas\documents\visual studio 2010\Projects\testsss\Debug\testsss.exe : fatal error LNK1120: 3 unresolved externals
使用此代码时出现这些错误。我不知道我做错了什么。如果我只是编译评论驱动程序和con行它运行
#include <iostream>
#include <stdlib.h>
#include <mysql_connection.h>
#include <mysql_driver.h>
using namespace std;
int main() {
sql::mysql::MySQL_Driver *driver;
sql::Connection *con;
driver = sql::mysql::get_mysql_driver_instance();
con = driver->connect("tcp://77.241.206.122", "mantas7776", "");
char a;
cin >> a;
return 0;
}