[英]C++ MySQL Linker errors
我是Visual C ++的新手。 我想使用MySQL / C ++。 所以我
C:\\ Program Files \\ MySQL \\ Connector.C ++ 1.1 \\ include <-标头
C:\\ Program Files \\ MySQL \\ Connector.C ++ 1.1 \\ lib <-库
1> DemoDB.obj:错误LNK2019:无法解析的外部符号“ __declspec(dllimport)public:class std :: basic_string,class std :: allocator> const&__thiscall sql :: SQLException :: getSQLState(void)const”((__imp_?getSQLState函数__catch $ _wmain $ 0中引用的@ SQLException @ sql @@ QBEABV?$ basic_string @ DU?$ char_traits @ D @ std @@ V?$ allocator @ D @ 2 @@ std @@ XZ)
1> DemoDB.obj:错误LNK2019:未解析的外部符号“ __declspec(dllimport)公共:int __thiscall sql :: SQLException :: getErrorCode(void)const”(__imp_?getErrorCode @ SQLException @ sql @@ QBEHXZ)在函数__catch $中引用_wmain $ 0 1> DemoDB.obj:错误LNK2019:无法解析的外部符号“ __declspec(dllimport)public:__thiscall sql :: SQLString ::〜SQLString(void)”(__imp _ ?? 1SQLString @ sql @@ QAE @ XZ) _wmain
1> DemoDB.obj:错误LNK2019:未解析的外部符号“ __declspec(dllimport)公共:__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;
1> DemoDB.obj:错误LNK2019:无法解析的外部符号“ __declspec(dllimport)public:class std :: basic_string,class std :: allocator> const&__thiscall sql :: SQLException :: getSQLState(void)const”((__imp_?getSQLState函数__catch $ _wmain $ 0中引用的@ SQLException @ sql @@ QBEABV?$ basic_string @ DU?$ char_traits @ D @ std @@ V?$ allocator @ D @ 2 @@ std @@ XZ)
到目前为止,我已经在下面提到了,但没有帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.