我有问题,我使用mysql++ 3.1.0:在vc2008的调试和发布模式下构建mysql++.sln后,使用instal.hta,然后将vc++目录中的目录添加到lib和include文件夹中,并在项目属性->链接器->通用附加库目录目录中添加mysqlpp.dll,mydqlpp.lib,mysqlpp_d.dll,mydqlpp_d.lib。这些代码:
#include <iostream>
#include <mysql++.h>
using namespace std;
using namespace mysqlpp;
int main()
{
Connection con;
return 0;
}获取以下错误:
error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall mysqlpp::Connection::~Connection(void)" (__imp_??1Connection@mysqlpp@@UAE@XZ) referenced in function _main
error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall mysqlpp::Connection::Connection(bool)" (__imp_??0Connection@mysqlpp@@QAE@_N@Z) referenced in function _main在visual studio 2008中。我该如何解决这个问题呢?
发布于 2011-03-29 06:47:27
我想您错过了最后一步here,它向您的项目添加了几个库: MySQL++ DLL导入库、MySQL C API库和Winsock DLL导入库。
https://stackoverflow.com/questions/5442967
复制相似问题