2015-07-03 88 views
0

我有一個程序,我開始在Linux Debian上,所以鏈接很容易。我所要做的只是命令行:鏈接增強內存映射文件

LIBS += -lboost_system -lboost_iostreams 

現在我必須在Windows上編譯相同的程序。我下載了升級版本1.58,然後執行bootstrap,然後bjam。這編譯提升並創建了包含所有庫的stage文件夾。

現在我使用內存映射文件類boost::iostreams::mapped_file_source(),所以我越來越多鏈接錯誤,從中我提到作爲一個例子:

FileCheck.obj:-1: error: LNK2019: unresolved external symbol "public: char const * __cdecl boost::iostreams::mapped_file_source::data(void)const " ([email protected][email protected]@[email protected]@QEBAPEBDXZ) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl MD5FromFile(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]@[email protected]@Z) 

我試圖鏈接,以提高這一點。所以我加了助手的路徑和:

LIBS += -L"X:/Path/to/boost/boost_1_58_0/stage/lib" 
LIBS += -llibboost_system-vc120-mt-1_58 -llibboost_iostreams-vc120-mt-1_58 
LIBS += -llibboost_system-vc120-mt-gd-1_58 -llibboost_iostreams-vc120-mt-gd-1_58 

但是我仍然得到這個錯誤。現在我想指出編譯器(VS2013)找到lib文件,但它顯然是不夠的。

我也想提一提,我用升壓:: ASIO也和OpenSSL,但是沒有問題,這些鏈接。

不知道如何聯繫起來,提升內存映射文件?

謝謝。

+0

當然關於32或64位庫版本?如果你在32中編譯並且庫在64中可以出現。 你有沒有檢查符號是否存在於庫中? – eroween

+0

@ LouisMartin-Pierrat你是對的!非常感謝:) –

+0

與Windows構建玩得開心。我在這裏等你。 – eroween

回答

1

當然關於32或64位庫版本?如果你在32中編譯並且庫在64中可以出現。