簡體   English   中英

用於64位窗口的64位Boost版本

[英]64-bit version of Boost for 64-bit windows

是否有適用於VS2008的64位Boost庫版本? 或者我必須自己編譯一個? 如果,那么,有沒有人有經驗呢?

簡而言之:

bjam --toolset=msvc-9.0 address-model=64 --build-type=complete

作為一個更長的答案,以下是我在同一層次結構中使用VS .NET 2008 32位和64位增強庫的構建說明(我懷疑這是一個常見的用例):

  1. 構建win32二進制文件

     bjam --toolset=msvc-9.0 --build-type=complete stage 
  2. 創建目錄lib \\ win32

  3. 將stage \\ lib的內容移動到lib \\ win32
  4. 刪除目錄bin.v2和stage
  5. 構建x64二進制文件

     bjam --toolset=msvc-9.0 address-model=64 --build-type=complete stage 
  6. 創建目錄lib \\ x64

  7. 將stage \\ lib的內容移動到lib \\ x64
  8. 刪除目錄bin.v2和stage

我在我的網站上有建立的二進制文件: http//boost.teeks99.com

編輯2013-05-13:我的構建現在可以直接從sourceforge頁面獲得(從1.53開始)。

更新(19.09.2017):為VS2017添加了腳本行。 請注意,Boost支持上述特定版本的VS2017編譯器。 我使用的是最新版本(1.65.1)。

我使用這個腳本來構建x64和x86平台的升壓,lib和dll,VS2017,VS2015和VS2013的調試和發布:

md stage\VS2017\x64
md stage\VS2015\x64
md stage\VS2013\x64    

b2 --stagedir=./stage/VS2017/x64 address-model=64 --build-type=complete --toolset=msvc-14.1 --threading=multi --runtime-link=shared --variant=debug
b2 --stagedir=./stage/VS2017/x64 address-model=64 --build-type=complete --toolset=msvc-14.1 --threading=multi --runtime-link=shared --variant=release  

b2 --stagedir=./stage/VS2015/x64 address-model=64 --build-type=complete --toolset=msvc-14.0 --threading=multi --runtime-link=shared --variant=debug
b2 --stagedir=./stage/VS2015/x64 address-model=64 --build-type=complete --toolset=msvc-14.0 --threading=multi --runtime-link=shared --variant=release

b2 --stagedir=./stage/VS2013/x64 address-model=64 --build-type=complete --toolset=msvc-12.0 --threading=multi --runtime-link=shared --variant=debug
b2 --stagedir=./stage/VS2013/x64 address-model=64 --build-type=complete --toolset=msvc-12.0 --threading=multi --runtime-link=shared --variant=release


md stage\VS2017\win32
md stage\VS2015\win32
md stage\VS2013\win32

b2 --stagedir=./stage/VS2017/win32 --build-type=complete --toolset=msvc-14.1 --threading=multi --runtime-link=shared --variant=debug
b2 --stagedir=./stage/VS2017/win32 --build-type=complete --toolset=msvc-14.1 --threading=multi --runtime-link=shared --variant=release

b2 --stagedir=./stage/VS2015/win32 --build-type=complete --toolset=msvc-14.0 --threading=multi --runtime-link=shared --variant=debug
b2 --stagedir=./stage/VS2015/win32 --build-type=complete --toolset=msvc-14.0 --threading=multi --runtime-link=shared --variant=release

b2 --stagedir=./stage/VS2013/win32 --build-type=complete --toolset=msvc-12.0 --threading=multi --runtime-link=shared --variant=debug
b2 --stagedir=./stage/VS2013/win32 --build-type=complete --toolset=msvc-12.0 --threading=multi --runtime-link=shared --variant=release

pause

您可以創建一個.bat文件並運行它來構建boost二進制文件。

此時,teeks99提供的64位二進制文​​件(參見其他答案)似乎是唯一可用的64位二進制文​​件。 有一段時間,BoostPro還提供了64位二進制文​​件,但從1.51開始,它們似乎已經出局或開展業務。

那么,我們又回到了兩個選項:teeks99二進制文件,或構建自己的二進制文件。

我需要建立自己的大部分信息都在這里: https//stackoverflow.com/a/2655683/613288

唯一缺少的是如何使用Visual Studio 2010 Express的免費版本。 我發現其他地方缺少部分,經過一些定制后,我用於構建boost 1.49.0二進制文件的最終配方是:

啟動Visual C ++,然后從“工具”菜單啟動Visual Studio命令提示符。

在控制台窗口中,執行以下操作:

"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\setenv.cmd"  /Release  /x64

然后在boost目錄中:

bootstrap.bat
b2  -a  -sBZIP2_SOURCE="C:\bzip2-1.0.6"   -sZLIB_SOURCE="C:\zlib-1.2.5"   --toolset=msvc-10.0  architecture=x86  address-model=64  link=static  --with-date_time  --with-filesystem  --with-serialization  --with-test  --with-thread  --with-system  --with-regex  --with-iostreams  stage

最后一個命令是根據我的需要進行定制的(只是一些靜態鏈接的庫)。

我為我制作了一個小腳本,為VS2005和VS2008編譯所有內容:

md stage\lib\win32
md stage\lib\x64

REM Visual Studio 2005
bjam --toolset=msvc-8.0 --build-type=complete stage
move /Y stage\lib\* stage\lib\win32\

bjam --toolset=msvc-8.0 address-model=64 --build-type=complete stage
move /Y stage\lib\* stage\lib\x64\

REM Visual Studio 2008
bjam --toolset=msvc-9.0 --build-type=complete stage
move /Y stage\lib\* stage\lib\win32\

bjam --toolset=msvc-9.0 address-model=64 --build-type=complete stage
move /Y stage\lib\* stage\lib\x64\

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM