2011-10-01 30 views
5

我正在嘗試使用本地GCC編譯器安裝來構建boost 1.45。我不能讓它使用默認的「g ++」不同的編譯器命令。這裏所發生的事情至今:如何讓boost.build使用特定的編譯器安裝?

在boost_1_45_0源目錄:使用gcc

:4.4.6:絕對路徑

./bootstrap.sh --with-toolset=gcc --prefix=$INSTALL/boost-$TYPE 

然後添加以下行 「projct-config.jam中」 ] /install/gcc-4.4.6/bin/g++:;

./bjam install --prefix=$INSTALL/boost-$TYPE 

在構建過程中調出進程列表時,可以看到系統的默認編譯器命令g ++被使用。

回答

1

問題是的先前定義使用了,這解決了這個問題:

項目config.jam中:

if ! gcc in [ feature.values <toolset> ] 
{ 
    using gcc : 4.4.6 : [absolute path]/install/gcc-4.4.6/bin/g++ : -L[absolute path]/install/gcc-4.4.6/lib64 -I[absolute path]/install/gcc-4.4.6/include ; 
} 
3

這應該是toolset=gcc-4.4.6而不是--with-toolset=gcc(功能不用破折號指定)。

相關問題