歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> 編譯Boost Python

編譯Boost Python

日期:2017/3/1 11:18:13   编辑:Linux編程

1.准備
運行 bootstrap.bat

2.project-config.jam的設置
using msvc ;

using python
: 2.7
: d:\\python27
: d:\\python27\\include
: d:\\python27\\libs
;

如果不設置python路徑的話,會導致有很多無法解析的符號的錯誤。

3.生成

x64 debug

bjam --with-python --prefix=d:\boost stage toolset=msvc-10.0 variant=debug link=shared address-model=64 threading=multi runtime-link=shared install

x64 release

bjam --with-python --prefix=d:\boost stage toolset=msvc-10.0 variant=release link=shared address-model=64 threading=multi runtime-link=shared install

----------------分割線----------------

編譯前提是安裝Python2.2以上:

(1)將$(BOOST)\tools\jam\src\bin.ntx86下的bjam.exe拷貝至$(BOOST)目錄下。

(2)編譯:bjam –-toolset=msvc –-with-python –-build-type=complete stage。

(3)編譯結果是生成dll和lib文件。

Copyright © Linux教程網 All Rights Reserved