32/64位Windows 7 下VC9.0編譯boost::regex,帶ICU

來源:互聯網
上載者:User

首先,我的是VC9.0,對應的是ICUC4C 4.4.2版本,要先去ICU的首頁上下載ICU4C 4.4.2,只需要下載編譯好的包就行了。

32位 http://download.icu-project.org/files/icu4c/4.4.2/icu4c-4_4_2-Win32-msvc9.zip

64位 http://download.icu-project.org/files/icu4c/4.4.2/icu4c-4_4_2-Win64-msvc9.zip

假設解壓ICU檔案夾放在D:\dev\icu。

然後在VS2008的CMD下進入boost主資料夾,並用如下命令編譯

32位

bjam -s ICU_PATH=d:\dev\icu --toolset=msvc-9.0 --with-regex --build-type=complete stage address-model=32

64位

註:必須在Visual Studio 2008 x64 Win64 Command Prompt中編譯

bjam -s ICU_PATH=d:\dev\icu --toolset=msvc-9.0 --with-regex --build-type=complete stage architecture=x86 address-model=64

產生的lib和dll檔案都被移到boost主資料夾下的stage檔案夾中

註:64位系統可以編譯32位的boost+icu,需要的icu為32位,編譯命令同32位

在VC9中,除了要在include和lib中添加ICU相應的include和lib路徑,還需要在編寫的代碼中加上

#pragma comment(lib, "icuuc.lib")#pragma comment(lib, "icuin.lib")#pragma comment(lib, "icudt.lib")

有更多問題

可以訪問這裡

http://devwiki.neosys.com/index.php/Building_Boost_32/64_on_Windows

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.