2010-04-26 25 views
43

我試圖找出gd意味着在提高庫名稱,我只找到其他兩個人尋找同樣的事情。如何解碼boost庫命名?

我想它應該是一個地方,這是明確記錄,我想找到它。

  • mt - bjam runtime-link=static
  • g - - multitheaded,與bjam threading=multi
  • s得到它使用標準和運行支持庫的調試版本。 什麼bjam切換???
  • d - 調試bjam variant=debug

更新

我如何控制什麼bjam開關控制了上述變種?實際上,我唯一無法確定的是g

+0

你有沒有試過谷歌「升壓庫山民黨sgd的含義」。第一個鏈接「Boost lib鏈接器錯誤Visual C++ - 堆棧溢出」給出的指針與Mark的答案相同。 – 2010-04-26 20:04:50

+0

是的,我用'命名'而不是'意義'做了類似的事情,在前20個結果中我什麼也沒找到。幫助頁面很好地解釋了它的含義,但它並未指定bjam開關如何改變它們。 – sorin 2010-04-27 08:23:02

回答

47

Boost getting started windows 6.3節的命名和section 6.1 on Unix naming

與-mt和d處理的那些是

-mt Threading tag: indicates that the library was built with multithreading support enabled. Libraries built without multithreading support can be identified by the absence of `-mt`. 

-d ABI tag: encodes details that affect the library's interoperability with other compiled code. For each such feature, a single letter is added to the tag as listed in this table: 
    Key Use this library when (Boost.Build option) 
    s  linking statically to the C++ standard library 
     and compiler runtime support libraries. 
     (runtime-link=static) 
    g  using debug versions of the standard and runtime support libraries. 
     (runtime-debugging=on) 
    y  using a special debug build of Python. 
     (python-debugging=on) 
    d  building a debug version of your code. 
     (variant=debug) 
    p  using the STLPort standard library rather than 
     the default one supplied with your compiler. 
     (stdlib=stlport) 
+0

謝謝,幫助幾乎解決了我的問題,現在它只剩下一個問題:什麼bjam開關觸發'g'? – sorin 2010-04-27 08:35:30

+1

請參閱5.3.4 - 選項「--build-type = complete」會導致bjam構建庫的所有受支持的變體。 – Mark 2010-04-27 09:38:58

+0

謝謝,我知道完整的變體,但想法是儘量減少磁盤空間,並只建立我需要/想要的東西。幸運的是'g'開關在默認情況下是啓用的,我獲得了我正在尋找的最小版本。不過,我想知道如何禁用它以便爲其他人記錄此事。 – sorin 2010-04-27 13:54:12

0

基本集的內置功能,這是你在命令行上指定的內容(feature = value),在BBv2文檔中進行了描述(請參閱builtin features)。我不知道我們是否已經在即將發佈的1.43版本中更新了入門指南,但是有一個出色的文檔更改,可以將這些內置選項說明添加到入門指南以便更快地訪問。

+0

我很確定在1.43中,這些裝飾字母的表格包含相應的Boost.Build功能。 – 2010-05-03 00:53:37

10

從Boost文檔在http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html#library-naming,慣例是:

-mt線程標記:表示該庫是在多線程啓用內置支持。沒有多線程支持的庫可以通過缺少-mt來識別。

-d ABI標記:對影響庫與其他編譯代碼的互操作性的細節進行編碼。對於每一個這樣的特徵,一個字母加入到標籤:

 
Key  Use this library when: 
s linking statically to the C++ standard library and compiler runtime support libraries. 
g using debug versions of the standard and runtime support libraries. 
y using a special debug build of Python. 
d building a debug version of your code. 
p using the STLPort standard library rather than the default one supplied with your compiler. 
n using STLPort's deprecated 「native iostreams」 feature. 

例如,如果你建立你的代碼的調試版本爲使用靜態運行時庫的調試版本,並在STLPort的標準庫「本地iostreams「模式,標籤將是:-sgdpn。如果以上都不適用,則省略ABI標籤。