我試圖使用SOCI庫來簡化MySQL訪問,但我堅持安裝庫。社會問題
什麼我迄今所做的是:
- 所做的項目,並通過CMake編譯它
- 鏈接我的項目到的編譯後生成的lib /釋放directoy。
- 鏈接我的項目到MySQL C連接lib目錄
,這裏是我的附加包含目錄: http://puu.sh/6qGNP.png
但不知何故,當我編譯示例程序,我得到了一堆鏈接錯誤的像這樣的:
1> main.obj:錯誤LNK2019:解析外部符號 「公共:虛擬__thiscall SOCI ::細節:: standard_into_type ::〜standard_into_type(無效)」(?? 1standard_into_type @細節@ SOC我@@ UAE @ XZ)中函數引用? 「市民:虛擬__thiscall SOCI ::細節:: into_type ::〜into_type(無效)」(?? 1 $ @ into_type H +細節@ SOCI @@ UAE @ XZ) 1> main.obj:錯誤LNK2001:解析外部符號 「受保護:虛擬無效__thiscall SOCI ::細節:: standard_into_type :: post_fetch(布爾,布爾)」(?post_fetch @ standard_into_type @細節@ @@ SOCI @ MAEX_N0 Z)
哪兒了我搞錯了嗎?
針對哪些庫鏈接您的應用程序? – tumdum
這裏是我的庫鏈接:http://puu.sh/6rqMt.png –
這些都是目錄,有什麼我問的是哪個庫(文件)你鏈接到的。這是http://en.wikibooks.org/wiki/C%2B%2B_Programming/Compiler/Linker/Libraries/Configuring_Visual_Studio上的步驟「庫文件」 – tumdum