2012-01-20 37 views
18

我正在查看jam文件,如何構建庫的名稱。 例如:libboost_log-mgw46-mt-1_48.dllBoost:bjam如何構建庫名稱?

我想忽略最後一部分,如何將鏈接器-o參數傳遞給我的構造名稱。 我有幾個版本,並在一個大項目鏈接迫使我做項目文件的變化,這是很多地方。

我希望得到libboost_log.dll。我剛剛重命名,但執行程序時說,它找不到 libboost_log-mgw46-mt-1_48.dll文件。

回答

23

Boost Bjam有3種不同的命名佈局定義。引用放在Jamroot文件中的幫助(我不知道任何更好的在線文檔):

# --layout=<layout>  Determines whether to choose library names 
#       and header locations such that multiple 
#       versions of Boost or multiple compilers can 
#       be used on the same system. 
# 
#        versioned - Names of boost binaries 
#        include the Boost version number, name and 
#        version of the compiler and encoded build 
#        properties. Boost headers are installed in a 
#        subdirectory of <HDRDIR> whose name contains 
#        the Boost version number. 
# 
#        tagged -- Names of boost binaries include the 
#        encoded build properties such as variant and 
#        threading, but do not including compiler name 
#        and version, or Boost version. This option is 
#        useful if you build several variants of Boost, 
#        using the same compiler. 
# 
#        system - Binaries names do not include the 
#        Boost version number or the name and version 
#        number of the compiler. Boost headers are 
#        installed directly into <HDRDIR>. This option 
#        is intended for system integrators who are 
#        building distribution packages. 
# 
#       The default value is 'versioned' on Windows, and 
#       'system' on Unix. 

system佈局讓你想命名方案 - 簡單的基本名稱,沒有任何其他信息。

根據這些佈局的Boost輸出文件的名稱使用boostcpp.jam文件中定義的tag規則生成。

+4

這讓我感到困擾,因爲在SO上查找這裏比在boost文檔中找到更容易。 – iAdjunct

相關問題