我正在尝试将MySQL Connector/C++添加到我的visual Studio 2010项目中.
我按照步骤(这里,mysql文档)将它添加到Visual Studio(我还在"附加包含目录"中添加了Boost).
它要求一个"sqlstring.h"文件(一个版本如何错过一个文件?!),所以我从源文件(mysql源档案)获得它.
然后,它要求libmyql.lib,我有MySQL Server 5.5\lib的lib目录.
而现在,我正在犯这个错误:
错误127错误LNK1120:31未解析的外部C:\ Users\Haks\Documents\Visual Studio 2010\Projects\ProductManager\Debug\ProductManager.exe ProductManager
错误60错误LNK2001:未解析的外部符号
"__declspec(dllimport) bool __cdecl std::operator<<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z)C:\ Users\Haks\Documents\Visual Studio 2010\Projects\ProductManager\ProductManager\mysqlcppconn-static.lib(mysql_ps_resultset.obj)ProductManager
所以,也许是因为我得到了MySQL Connector/C++ 1.1的二进制版本,也许它与VS 2010不兼容......
但我找不到编译源文件的好方法,而且我从不使用Boost或CMake,而且似乎需要它.
我没有找到任何关于我的问题的提法,所以如果有人得到回应或者有好的方式,那对我和我想的很多人来说都会非常有用.
谢谢