- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在尝试安装 boost 库 (1.53) 以便在 Windows 下的 64 位应用程序中使用它。但是,我在尝试设置它时遇到了一系列错误,就像我以前对 MinGW32 和更早的提升版本所做的那样...
现在,我在第一步 - 执行 ./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 等可执行文件符号链接(symbolic link)到 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 安装中缺少文件。尝试再次运行安装程序并确保为 gcc 编译器(Cygwin,而不是 MinGW64)安装了所有东西。我成功运行了 bootstrap.sh,bjam 使用默认的 Cygwin gcc 编译器编译得很好。在那之后,我遇到了一些减速带,但使用 MinGW64 编译一切都很好。我在 tools\build\v2\user-config.jam 中添加了编译器可执行文件,如下所示:
using gcc : 4.5.3 : x86_64-w64-mingw32-gcc.exe ;
我最终得到了以下命令行:
./b2 --toolset=gcc target-os=windows --build-dir=/cygdrive/c/whatever/boost_build variant=debug,release link=static runtime-link=static architecture=x86 address-model=64 threadapi=win32 --layout=tagged --without-mpi --stagedir=lib/win64gcc -j4 stage
...然后我用 link=shared runtime-link=shared
尝试了同样的方法,但是我有很多编译错误我还没有弄清楚。
一些可能对您有帮助的链接:
编辑:我最终使用了 MinGW64 TDM,它比 Cygwin MinGW64 容易得多,因为它不是交叉编译器。只需安装 MinGW64 TDM,添加 MSYS,完成! Boost 编译没有任何问题。
关于c++ - 使用 MinGW 64 安装 boost - (Cygwin),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16195039/
我已经开始使用 MinGW/MSYS 试图在 Windows 上使用一些 Linux 库。使用 ./configure --prefix=/mingw make make install 到目前为止运
Mingw.org显然还没有完全死掉,但最新的版本是 gcc 4.5.2,而 4.6 已经是老新闻了。 有谁知道我在哪里可以获得 mingw-gcc 4.6+?是 mingw-w64更活跃?他们似乎也
假设我有三个 C 源文件。前两个是 LIB(lib*.a?),第三个是使用它们的应用程序。 第一个是(re.c): int re(int i) { return i; } 第二个是(test.
MinGW、MinGW-w64和MinGW-builds有什么区别? 我应该使用哪一个在 Windows 8 机器上使用 Eclipse IDE 编译 c++ 11 源代码? 最佳答案 MinGW 是
至少从2021-01-10T15:19:40Z起,我无法访问www.mingw.org。 据我所知,这是mingw官方网页。 有人知道www.mingw.org的状态吗?或者,还有其他套房问这个问题吗
MinGW 有什么区别项目和 32-bit portion MinGW-w64的项目? MinGW-w64 的 32 位部分与 x64 有任何关系吗? 看起来他们的编译器做了完全相同的事情......
我想在 Windows 中有一个 POSIX 环境(用作系统 shell ),同时生成 native Windows 可执行文件。过去的一种选择是安装 Cygwin 和 MinGW,并可能从 Cygw
Qt 和 Code blocks 下载包都有自己的 MinGW 编译器。还有独立的 MinGW 本身。它们之间有什么区别吗? 我可以使用 Qt 的 MinGW 来构建代码块项目,反之亦然吗? 如果我想
我已经通过网络安装程序安装了 msysgit。我最终得到了将近 2 GB 的资料,其中包括 git 源和 MinGW。 我有三个问题 我已经从 MinGW.org 获得了 MinGW。现在我想我可以删
我终于设置了 mingw 和 msys,现在我想编译 libjpeg。我从 projekt 页面 (jpeg-8d) 下载了最新的 libjpeg 源并提取了文件。 然后我像这样运行配置命令: ./c
我喜欢 vcpkg 的想法,但我想我更愿意坚持使用 MinGW 作为我的编译器。 我找不到关于我是否可以设置(或如何设置)vcpkg 以便它为 MinGW 而不是 MSVC 编译包的任何资源。如果可能
我将在 Windows 中使用 NetCDF,我认为它必须使用 MinGW 编译,因为我的主程序和所有其他库已经使用 MinGW 编译。 但是当我使用 MinGW(gcc 版本 4.6.2)时。我收到
我正在尝试设置 MinGW。我已经下载了最新的安装程序,它安装了 mingw-get,但该实用程序无法获取软件包并提供以下类型的消息: mingw-get: * ERROR * Get package
我想使用 mingw-get-inst-20120421.exe 从 Sourceforge 下载 MinGW C 和 C++ gnu 编译器。它让我可以选择下载预先打包的存储库或最新的存储库。当我在
我刚刚按照 this post 设置了 MinGW 环境 但是如何向其中添加 3rd 方库? 最佳答案 库由两个主要组件组成——C 头文件和编译后的目标代码存档。 GCC 有一系列令人眼花缭乱的方法来
我不断收到错误: fatal error: mpi.h: No such file or directory 如何将 mpi.h 作为默认库包含在内?我相信我已经将 c:\MPICH2\bin 放在
看我有这样的代码 #include #include #include void* thread_function(void) { printf ("This is thread %d \n",p
如何使用 Mingw 在 Windows 中为源目录应用补丁文件? 最佳答案 使用mingw-get获取msys补丁 mingw-get install msys-patch 然后像unix一样使用p
我正在尝试使用来自 http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%
我刚刚在 Windows 上安装了 MinGW,但无法像在 Linux 甚至 PuTTY 上那样进行复制/粘贴。将文本(例如从 chrome)复制并粘贴到 MinGW shell 中的技巧是什么? 最
我是一名优秀的程序员,十分优秀!