0
我使用cmake構建我的項目文件。MySQL庫不鏈接
這是我額外的鏈接庫:
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
..\boost\Debug\boost_lib_thread.lib
..\boost\Debug\boost_lib_system.lib
..\global\Debug\global.lib
C:\Program Files (x86)\OpenSSL-Win32\lib\VC\libeay32MD.lib
C:\Program Files (x86)\OpenSSL-Win32\lib\VC\ssleay32MDd.lib
C:\Program Files (x86)\OpenSSL-Win32\lib\VC\libeay32MDd.lib
C:\Program Files\MySQL\MySQL Server 5.5\lib\libmysql.lib
我獲得以下錯誤,當我試圖編譯:
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual __thiscall Database::~Database(void)" ([email protected]@[email protected])
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall Database::InitDB(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned long,unsigned long)" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected])
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall Database::InitDB(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned long,unsigned long)" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected])
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall Database::InitDB(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned long,unsigned long)" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected])
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall Database::InitDB(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned long,unsigned long)" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected])
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Database::EscapeString(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@Z)
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "protected: bool __thiscall Database::_SendQuery(struct DatabaseConnection *,char const *,bool)" ([email protected]@@[email protected]@[email protected])
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "protected: bool __thiscall Database::_SendQuery(struct DatabaseConnection *,char const *,bool)" ([email protected]@@[email protected]@[email protected])
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: __thiscall QueryResult::~QueryResult(void)" ([email protected]@[email protected])
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall QueryResult::NextRow(void)" ([email protected]@@QAE_NXZ)
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "protected: class QueryResult * __thiscall Database::_StoreQueryResult(struct DatabaseConnection *)" ([email protected]@@[email protected]@[email protected]@@Z)
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "protected: class QueryResult * __thiscall Database::_StoreQueryResult(struct DatabaseConnection *)" ([email protected]@@[email protected]@[email protected]@@Z)
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "protected: class QueryResult * __thiscall Database::_StoreQueryResult(struct DatabaseConnection *)" ([email protected]@@[email protected]@[email protected]@@Z)
1>global.lib(DatabaseSystem.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: static void __cdecl Database::CleanupLibs(void)" ([email protected]@@SAXXZ)
1>C:\Users\FreakX\Desktop\FrostCore2\build\source\authserver\Debug\AuthServer.exe : fatal error LNK1120: 14 unresolved externals