windows下編譯boost的參數說明

windows下命令編譯boost的基本參數說明(以1.62爲例):

bjam install  ^
	--prefix=E:\caffe-static\release\boost_windows_vc140_x86_64_md ^
	--without-python
	-a -d+3 -q -j8 ^
	--debug-configuration ^
	link=static ^
	runtime-link=shared ^
	toolset=msvc-14.0 ^
	address-model=64 ^
	release debug

命令行參數說明:

  • install|stage 指定安裝方式,intall 安裝include 頭文件和庫文件,stage只安裝庫文件
  • –prefix 'install’安裝時指定安裝位置
  • –stagedir 'stage’安裝時指定安裝位置
  • –without-<library>指定不編譯的庫<library>,可選項,不指定編譯所有庫
  • –with-<library> 編譯安裝指定的庫<library>,可選項,不指定編譯所有庫
    所有庫列表:
    atomic chrono container context coroutine date_time exception filesystem
    graph graph_parallel iostreams locale log math mpi program_options python
    random regex serialization signals system test thread timer wave
  • -a 全部重新編譯,可選項
  • -d+3 log信息顯示級別,可選項
  • -q 參數指示出錯就停止編譯,可選項
  • -jx 併發編譯線程數,提高編譯速度,可選項
  • link=static 編譯靜態庫
  • –debug-configuration 編譯時顯示加載的配置信息,可選項
  • toolset 指定編譯器工具鏈,本文中msvc-14.0是Visual Studio 2015
  • address-model 指定生成的尋址模式,=32 編譯32位庫,=64編譯64位庫
  • link=static|shared 指定生靜態庫(staic)或動態庫(shared)
  • runtime-link=static|shared
    static --指定生的boost庫鏈接靜態C/C++運行庫, 對於MSVC對應 /MT
    shared --指定生的boost庫鏈接動態C/C++運行庫, 對於MSVC對應 /MD
  • release debug 同時生成debug和release版本
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章