[英]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.