2013-07-02 43 views
0

我想在Windows 7 64位下的Cygwin下編譯boost 1.50.0。無法在Windows 7上的Cygwin下編譯boost 1.50.0 64位

我運行命令:

./bootstrap.sh –prefix=boost/ 

和我回去:

Building Boost.Build engine with toolset gcc... 
Failed to build Boost.Build build engine 
Consult 'bootstrap.log' for more details 

這裏是日誌:

### 
### Using 'gcc' toolset. 
### 
rm -rf bootstrap 
mkdir bootstrap 
gcc -o bootstrap/jam0 command.c compile.c constants.c debug.c function.c glob.c   hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathunix.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c 
function.c: In function ‘var_edit_shift’: 
function.c:653:13: warning: ‘cygwin_conv_to_win32_path’ is deprecated (declared at /usr/include/sys/cygwin.h:36) [-Wdeprecated-declarations] 
./bootstrap/jam0 -f build.jam --toolset=gcc --toolset-root= clean 
./build.sh: line 13: 8144 Segmentation fault  [email protected] 

可能是什麼問題呢?如何解決它?

+0

不知道你是否能構建二進制庫尚未(通常大多數boost只是頭文件,你只需手動建立一些庫)。但以我的經驗來看,構建/使用Boost非常複雜。 –

回答

1

該錯誤顯然表明cygwin_conv_to_win32_path已被棄用。

function.c:653:13:警告: 'cygwin_conv_to_win32_path' 被棄用 (在/usr/include/sys/cygwin.h:36聲明)[-Wdeprecated-聲明]

歷史: 函數cygwin_conv_to_win32_path在Cygwin 1.x中受支持,並在2.x版本中被棄用。 2.x提供替換API cygwin_conv_path

如何解決? 添加定義如下這些不贊成的方法,它應該解決這個問題(我做了同樣是能夠建立在Cygwin的Boost庫)

void cygwin_conv_to_win32_path(const char *posix, char * win32) 
{ 
    /* Get the size */ 
    ssize_t size = cygwin_conv_path(CCP_POSIX_TO_WIN_A, posix, NULL, 0); 
    cygwin_conv_path(CCP_POSIX_TO_WIN_A, posix, win32, size); 
} 

void cygwin_conv_to_posix_path (const char *win32, char * posix) 
{ 
    /* Get the size */ 
    ssize_t size = cygwin_conv_path(CCP_WIN_A_TO_POSIX, win32, NULL, 0); 
    cygwin_conv_path( CCP_WIN_A_TO_POSIX , win32, posix, size); 
} 
1

boost不是一個簡單的構建包,而且還需要大量構建系統和代碼修補程序才能正確構建和工作。 (有關詳細信息,請參見Cygwin Ports git。)我強烈建議您使用Cygwin發行版中的libboost-devel包。