【发布时间】:2013-04-18 04:25:07
【问题描述】:
我正在尝试安装 boost 库 (1.53) 以在 Windows 下的 64 位应用程序中使用它。但是,我在尝试以与 MinGW32 和更早的 boost 版本相同的方式进行设置时遇到了一系列错误...
现在,我在第一步一直失败 - 执行 ./bootstrap.sh。返回以下错误:
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 ÔÇścheck_alignmentÔÇÖ:
function.c:222:5: warning: cast from pointer to integer of different size
builtins.c:33:23: fatal error: sys/wait.h: No such file or directory
compilation terminated.
execunix.c:17:26: fatal error: sys/resource.h: No such file or directory
compilation terminated.
fileunix.c:98:17: fatal error: ar.h: No such file or directory
compilation terminated.
当我改为运行 bootstrap.bat 时,Boost.Build 会自行构建,但是稍后我会遇到奇怪的错误。起初,我尝试将 x86_64-w64-mingw32-gcc 等可执行文件符号链接到 gcc,但最终出现许多“拒绝访问”错误,所以我只是将 x86_64-w64-mingw32-XX 文件复制粘贴到简单的 XX 中.exe 的。现在我可以开始正确的构建,但最终得到:
...failed gcc.archive bin.v2\libs\thread\build\gcc-mingw-4.5.3\debug\address-model-64\link-static\threading-multi\libboost_thread-mgw45-mt-d-1_53.a...
gcc.archive bin.v2\libs\thread\build\gcc-mingw-4.5.3\release\address-model-64\link-static\threading-multi\libboost_thread-mgw45-mt-1_53.a
System cannot find the path specified.
System cannot find the path specified.
我发现它正在尝试使用类似 Win 的路径斜杠 (/vs\),并且可能因此而失败。
我不想使用 MSVC,因为我试图让我的代码尽可能地可移植,而且它是 64 位的也很重要。
提前致谢。
【问题讨论】:
-
虽然我知道如何解决你的问题,但我想先问一下,你为什么要坚持使用Cygwin?真是废话。你知道MinGW-w64吗?
-
@Haroogan 好吧...我首先使用的是 MinGW-w64..
-
那请问Cygwin在标题中是做什么的?
-
@Haroogan 好吧,可能是因为我正在为 Cygwin 使用 x86_64-w64-mingw32-g++ 包,这是默认和推荐的使用方式?
-
这是错误的假设。您从哪里获得这些信息?