Sim*_*Guy 1 c++ mysql boost visual-studio-2010
我是Visual C++的新手.我想使用MySQL/C++.所以我
C:\ Program Files\MySQL\Connector.C++ 1.1\include < - Headers
C:\ Program Files\MySQL\Connector.C++ 1.1\lib < - Libs
1> DemoDB.obj:错误LNK2019:未解析的外部符号"__declspec(dllimport)public:class std :: basic_string,class std :: allocator> const&__thiscall sql :: SQLException :: getSQLState(void)const"(__ imp_?getSQLState @ SQLException @sql @@ QBEABV?$ basic_string @ DU?$ char_traits @ D @ std @@ V?$ allocator @ D @ 2 @@ std @@ XZ)在函数__catch $ _wmain $ 0中引用
1> DemoDB.obj:错误LNK2019:未解析的外部符号"__declspec(dllimport)public:int __thiscall sql :: SQLException :: getErrorCode(void)const"(__ imp_?getErrorCode @ SQLException @sql @@ QBEHXZ)在函数__catch $中引用_wmain $ 0 1> DemoDB.obj:错误LNK2019:未解析的外部符号"__declspec(dllimport)public:__ thishisall sql :: SQLString :: ~SQLString(void)"(__ imp _ ?? 1SQLString @sql @@ QAE @ XZ)在函数中引用_wmain
1> DemoDB.obj:错误LNK2019:未解析的外部符号"__declspec(dllimport)public:__ thiscall sql :: SQLString :: SQLString(char const*const)"(__ imp _ ?? 0SQLString @sql @@ QAE @ QBD @ Z)引用在函数_wmain中
1> DemoDB.obj:错误LNK2019:函数_wmain中引用的未解析的外部符号__imp__get_driver_instance
1> DemoDB.obj:错误LNK2019:未解析的外部符号"__declspec(dllimport)public:class std :: basic_string,class std :: allocator> const&__thiscall sql :: SQLString :: asStdString(void)const"(__ imp_?asStdString @ SQLString @sql @@ QBEABV?$ basic_string @ DU?$ char_traits @ D @ std @@ V?$ allocator @ D @ 2 @@ std @@ XZ)在函数"class std :: basic_ostream>&__cdecl std中引用: :operator <<(class std :: basic_ostream>&,class sql :: SQLString const&)"(?? 6std @@ YAAAV?$ basic_ostream @ DU?$ char_traits @ D @ std @@@ 0 @ AAV10 @ ABVSQLString @ SQL @@@ Z)
请帮忙.我完全陷入困境
编辑:
此行导致以下错误
cout << ", SQLState: " << e.getSQLState() << " )" << endl;
Run Code Online (Sandbox Code Playgroud)
1> DemoDB.obj:错误LNK2019:未解析的外部符号"__declspec(dllimport)public:class std :: basic_string,class std :: allocator> const&__thiscall sql :: SQLException :: getSQLState(void)const"(__ imp_?getSQLState @ SQLException @sql @@ QBEABV?$ basic_string @ DU?$ char_traits @ D @ std @@ V?$ allocator @ D @ 2 @@ std @@ XZ)在函数__catch $ _wmain $ 0中引用
到目前为止我已经提到过,但没有帮助
经过多次努力,我设法解决了这个问题.以下是帮助我的原因
毕竟,建立项目,它运行良好!:)
| 归档时间: |
|
| 查看次数: |
1454 次 |
| 最近记录: |