2013-07-02 102 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包。