我试图在Windows 7 64位上的Cygwin下编译boost 1.50.0。
我运行命令:
./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 $@
可能是什么问题呢?怎么解决呢?
最佳答案
该错误表明cygwin_conv_to_win32_path
已过时。
function.c:653:13: warning: ‘cygwin_conv_to_win32_path’ is deprecated (declared at /usr/include/sys/cygwin.h:36) [-Wdeprecated-declarations]
历史:
Cygwin 1.x支持
cygwin_conv_to_win32_path
函数,而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);
}
关于boost - 无法在Windows 7 64位上的Cygwin下编译Boost 1.50.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17428428/