我正在尝试使用 SOCI 库来轻松访问 MySQL,但我一直在安装该库。
到目前为止我所做的是:
- 制作项目并用 CMake 编译
- 将我的项目链接到编译后创建的 lib/release 目录。
- 将我的项目链接到 MySQL C 连接器 lib 目录
这是我的附加包含目录: http: //puu.sh/6qGNP.png
但是不知何故,当我编译示例程序时,我得到了一堆像这样的链接器错误:
1>main.obj : 错误 LNK2019: 未解析的外部符号“public: virtual __thiscall soci::details::standard_into_type::~standard_into_type(void)” (??1standard_into_type@details@soci@@UAE@XZ) 在函数中引用公共:虚拟 __thiscall soci::details::into_type::~into_type(void)" (??1?$into_type@H@details@soci@@UAE@XZ) 1>main.obj:错误 LNK2001:未解析的外部符号“受保护:虚拟 void __thiscall soci::details::standard_into_type::post_fetch(bool,bool)” (?post_fetch@standard_into_type@details@soci@@MAEX_N0@Z)
我哪里搞砸了?