建设有MinGW64升压没有MASM [英] Building Boost with MinGW64 without MASM

查看:335
本文介绍了建设有MinGW64升压没有MASM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立使用MinGW64编译器原生64位Boost库,但得到了一些故障。任何指针是AP preciated。谢谢你。

我得到了64位(含警告)编译bjam.exe(b2.exe),我用它获取建造的提振。建设Boost.Context当我得到了下面的错误。 (我在批次重复建设写的命令)。什么我错过了吗?


  • 命令:b2.exe安装 - preFIX =%〜DP0 \\ BLD \\ Boost.Build

  • 错误:ml64不被识别为一个内部或外部命令,可操作的程序或批处理文件

我阅读文档,它说:

Boost.Context必须为特定的编译器(S)和CPU架构(多个)建立S是靶向。 Boost.Context包括装配code,因此,需要GNU AS支持的POSIX系统和MASM Windows系统。

那么,是不是可以告诉的bjam使用列入我MinGW的安装as.exe?
(因为我有多个MinGW的,位置不是标准为C:\\ MinGW的\\ BIN)

项目config.jam中

 导入选项;
使用gcc;
option.set保持持续:假的;

平台


  • Windows 7的64

  • 升压1.52.0(来源从SourceForge)

  • MinGW的4.7.2(rubenvb 64)

  • 无MSVC安装(没有安装ml64.exe /在我的机器中)

  • 安装WDK时发生修改问题

建筑bjam的警告时,中,我认为这可以忽略不计。

  function.c:在函数'check_alignment:
function.c:222:5:警告:一个指针转换为大小不同的整数[-Wpointer对INT-投]

全批

  SET OPATH =%PATH%
SET BOOST_VER = boost_1_52_0
SETPATH_ZIP = C:\\ Program Files文件\\ 7-ZIP
SETPATH_MINGW = C:\\ MinGW的\\ rubenvb-4.7.2-64
SETPATH_SRC =%〜DP0 \\%BOOST_VER%
SETPATH_BJAM =%PATH_SRC%\\工具\\编译\\ V2 \\引擎标题抽取包...
如果不存在#%PATH_SRC%.7z压缩GOTO:err_nozip
RD / S / Q%PATH_SRC%
%PATH_ZIP%\\ 7z格式X%PATH_SRC%.7z压缩TITLE建设的bjam ...
PUSHD%PATH_BJAM%
SETPATH =%PATH_MINGW%\\ BIN
SETBOOST_JAM_TOOLSET_ROOT =%PATH_MINGW%\\
CALL的build.bat MinGW的 - 显示,定位目标
SET PATH =%OPATH%
COPYbin.ntx86_64 \\ b2.exe%PATH_SRC%\\> NUL
COPYbin.ntx86_64 \\ bjam.exe%PATH_SRC%\\> NUL
POPDTITLE安装Boost构建...
PUSHD%PATH_SRC%
ECHO导入选项; >项目config.jam中
回声。 >>项目config.jam中
ECHO使用gcc; >>项目config.jam中
回声。 >>项目config.jam中
ECHO option.set保持持续:假的; >>项目config.jam中
回声。 >>项目config.jam中
b2.exe安装 - preFIX =%〜DP0 \\ BLD \\ Boost.Build
POPDSET PATH =%OPATH%


解决方案

这是建设升压>〜1.51使用MinGW一个已知的问题。目前,构建加强与MinGW的坏,因为加速对MASM的依赖(你的情况ml64)建设的boost ::上下文时为Windows,甚至与MinGW的。

作为bodge你可以从微软的网站获得MASM: http://www.microsoft.com/en-gb/download/details.aspx?id=12654 的32位版本,否则为64位版本的Windows驱动程序工具包:的 http://msdn.microsoft.com/en-us/windows/hardware/hh852365。 ASPX

您可以使用所提供的升压bug跟踪此补丁: https://开头SVN .boost.org / TRAC /升压/票/ 7262 虽然做的boost ::上下文只有MinGW的编译,从而重新启用升压的交叉编译。您也可以通过阅读Boost的奥利关于这个问题的反应,他对这个问题的回应。不要指望什么固定在升压一段时间,至少!

I tried to build the Boost library for native 64bit using MinGW64 compiler, but got some failures. Any pointers are appreciated. Thanks.

I got the bjam.exe (b2.exe) compiled in 64bit (with warning) and I used it the get the Boost built. I got the following error when building Boost.Context. (I wrote the command in batch for repeatable building). Anything I missed?

  • Command: b2.exe install --prefix=%~dp0\bld\Boost.Build
  • Error: 'ml64' is not recognized as an internal or external command, operable program or batch file.

I read the documentation and it said:

Boost.Context must be built for the particular compiler(s) and CPU architecture(s)s being targeted. Boost.Context includes assembly code and, therefore, requires GNU AS for supported POSIX systems, and MASM for Windows systems.

So, is it possible to tell the bjam to use the as.exe included in my MinGW installation? (As I have multiple MinGW, the location is not standard as C:\MinGW\bin)

project-config.jam

import option ;
using gcc ; 
option.set keep-going : false ; 

Platform

  • Windows 7 x64
  • Boost 1.52.0 (source from sourceforge)
  • MinGW 4.7.2 (rubenvb x64)
  • No MSVC installation (no ml64.exe installed/found in my machine)
  • Edit Problems occurred when installing WDK

Warning when building BJam, I think it can be ignored

function.c: In function 'check_alignment':
function.c:222:5: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Full batch

SET OPATH=%PATH%
SET BOOST_VER=boost_1_52_0
SET "PATH_ZIP=C:\Program Files\7-zip"
SET "PATH_MINGW=C:\MinGW\rubenvb-4.7.2-64"
SET "PATH_SRC=%~dp0\%BOOST_VER%"
SET "PATH_BJAM=%PATH_SRC%\tools\build\v2\engine"

TITLE Extracting Packages ...
IF NOT EXIST "%PATH_SRC%.7z" GOTO :err_nozip
RD /S /Q "%PATH_SRC%"
"%PATH_ZIP%"\7z x "%PATH_SRC%.7z"

TITLE Building BJam ...
PUSHD "%PATH_BJAM%"
SET "PATH=%PATH_MINGW%\bin"
SET "BOOST_JAM_TOOLSET_ROOT=%PATH_MINGW%\"
CALL build.bat mingw --show-locate-target
SET PATH=%OPATH%
COPY "bin.ntx86_64\b2.exe" "%PATH_SRC%\" > nul
COPY "bin.ntx86_64\bjam.exe" "%PATH_SRC%\" > nul
POPD

TITLE Installing Boost Build...
PUSHD "%PATH_SRC%"
ECHO import option ; > project-config.jam
ECHO. >> project-config.jam
ECHO using gcc ; >> project-config.jam
ECHO. >> project-config.jam
ECHO option.set keep-going : false ; >> project-config.jam
ECHO. >> project-config.jam
b2.exe install --prefix=%~dp0\bld\Boost.Build
POPD

SET PATH=%OPATH%

解决方案

This is a known issue for building Boost >~1.51 with MinGW. At the moment, building Boost with MinGW is broken because Boost has a dependency on MASM (in your case ml64) when building Boost::Context for Windows, even with MinGW.

As a bodge you can get MASM from the Microsoft Website: http://www.microsoft.com/en-gb/download/details.aspx?id=12654 for a 32-bit version, or else the Windows Driver Kit for the 64-bit version: http://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx

You can use the patch provided on the Boost bug tracker here: https://svn.boost.org/trac/boost/ticket/7262 though to make Boost::Context compile with just MinGW, thus re-enabling cross-compilation of Boost. You can also read the responses by Boost's Olli on the subject and his response to the subject. Don't expect anything to be fixed in Boost for a while at least!

这篇关于建设有MinGW64升压没有MASM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆