我在將twitter API twitcurl與我的OpenFrameworks解決方案集成時遇到問題。 wiki說明聲明將構建的庫靜態鏈接到我的解決方案。這是我所做的。從VS2010解決方案靜態鏈接twitcurl庫到VS2012解決方案的問題
我的步驟如下:
1)下載twitcurl庫並建立它在VS2012。該解決方案文件基於VS2010,因此我不得不在2012年內對其進行更新。構建版本是作爲發佈版本。
2)將twitcurl.lib從其發佈文件夾靜態鏈接到我的OpenFrameworks解決方案。
下面是我想建立之後得到了錯誤:
1>twitcurl.lib(oauthlib.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
1>twitcurl.lib(oauthlib.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj
1>twitcurl.lib(twitcurl.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
1>twitcurl.lib(twitcurl.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj
1>twitcurl.lib(HMAC_SHA1.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
1>twitcurl.lib(HMAC_SHA1.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj
1>twitcurl.lib(base64.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
1>twitcurl.lib(base64.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj
1>twitcurl.lib(urlencode.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
1>twitcurl.lib(urlencode.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj
我從以下這些錯誤一些閱讀中瞭解到,當試圖靜態鏈接的發佈版本到調試這些通常觀察版。隨後,我嘗試了所有其他組合,嘗試在調試模式下構建twitcurl,並以其他方式進行。靜態鏈接庫的調試版本給我更多的錯誤,如:
1>twitcurl.lib(twitcurl.obj) : error LNK2019: unresolved external symbol __imp__curl_slist_free_all referenced in function "public: bool __thiscall twitCurl::oAuthHandlePIN(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z)
1>twitcurl.lib(twitcurl.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_init referenced in function "public: __thiscall twitCurl::twitCurl(void)" ([email protected]@[email protected])
1>twitcurl.lib(twitcurl.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_setopt referenced in function "public: __thiscall twitCurl::twitCurl(void)" ([email protected]@[email protected])
1>twitcurl.lib(twitcurl.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_perform referenced in function "public: bool __thiscall twitCurl::oAuthHandlePIN(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z)
1>twitcurl.lib(twitcurl.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_cleanup referenced in function "public: __thiscall twitCurl::~twitCurl(void)" ([email protected]@[email protected])
1>twitcurl.lib(twitcurl.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_getinfo referenced in function "public: bool __thiscall twitCurl::oAuthHandlePIN(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z)
1>bin\SocialBuildings_debug.exe : fatal error LNK1120: 7 unresolved externals
這是什麼原因?以及如何找到解決方法?
非常感謝您的幫助