【问题标题】:build boost for gcc using cygwin on Windows 7 - bootstrap error在 Windows 7 上使用 cygwin 为 gcc 构建提升 - 引导错误
【发布时间】:2015-01-27 23:13:12
【问题描述】:

我下载了 boost 并且正在这样做

admin@US01WKS03044 /cygdrive/c/Users/admin/Downloads/boost_1_49_0
$ ./bootstrap.bat gcc
Building Boost.Build engine
filent.c:35:21: fatal error: direct.h: No such file or directory
 # include <direct.h>
                     ^
compilation terminated.
jam.c: In function ‘main’:
jam.c:181:25: error: ‘environ’ undeclared (first use in this function)
     #define use_environ environ
                         ^
jam.c:417:22: note: in expansion of macro ‘use_environ’
         var_defines( use_environ, 1 );
                      ^
jam.c:181:25: note: each undeclared identifier is reported only once for each function it appears in
     #define use_environ environ
                         ^
jam.c:417:22: note: in expansion of macro ‘use_environ’
         var_defines( use_environ, 1 );
                      ^
jam.c: In function ‘executable_path’:
jam.c:628:18: warning: comparison between pointer and integer
     if (argv0[0] == "/")
                  ^
pathunix.c:276:19: fatal error: tchar.h: No such file or directory
 #include <tchar.h>
                   ^
compilation terminated.
builtins.c:39:0: warning: "WIFEXITED" redefined
 # define WIFEXITED(w)  (((w) & 0XFFFFFF00) == 0)
 ^
In file included from /usr/include/cygwin/stdlib.h:14:0,
                 from /usr/include/stdlib.h:25,
                 from jam.h:89,
                 from builtins.c:7:
/usr/include/cygwin/wait.h:34:0: note: this is the location of the previous definition
 #define WIFEXITED(w) ((__wait_status_to_int(w) & 0xff) == 0)
 ^
builtins.c:40:0: warning: "WEXITSTATUS" redefined
 # define WEXITSTATUS(w)(w)
 ^
In file included from /usr/include/cygwin/stdlib.h:14:0,
                 from /usr/include/stdlib.h:25,
                 from jam.h:89,
                 from builtins.c:7:
/usr/include/cygwin/wait.h:39:0: note: this is the location of the previous definition
 #define WEXITSTATUS(w) ((__wait_status_to_int(w) >> 8) & 0xff)
 ^

Failed to build Boost.Build engine.
Please consult bootstrap.log for furter diagnostics.

You can try to obtain a prebuilt binary from

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.

关于为什么我可能会收到此错误的任何建议?

【问题讨论】:

    标签: c++ gcc boost


    【解决方案1】:

    文件bootstrap.bat 用于从Windows 命令提示符构建Boost,以创建本机Windows 版本的Boost。如果您想从 Cygwin shell 构建 Cygwin 版本的 Boost,您应该遵循 instructions for building Boost on Unix-type systems

    或者正如 Boost 的 Getting Started on Windows 页面顶部的这条消息所说:

    Cygwin 和 MinGW 用户须知

    如果您打算在 Windows 命令提示符下使用您的工具,那么您在 正确的地点。如果你打算从 Cygwin bash shell 构建,你实际上是 在 POSIX 平台上运行,并应遵循以下说明 getting started on Unix variants

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-13
      • 1970-01-01
      • 2013-02-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多