如何使用dec1/Boost-for-Android为带有NDK r18b的Android构建Boost 1.69.0? [英] How to build boost 1.69.0 for Android with NDK r18b using dec1/Boost-for-Android?

查看:296
本文介绍了如何使用dec1/Boost-for-Android为带有NDK r18b的Android构建Boost 1.69.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用 https://github.com/dec1/Boost-for-Android 编译Android版Boost.报告说NDK r18b支持1.69.0.我在Windows 7下.

I tried to use https://github.com/dec1/Boost-for-Android to compile boost for Android. It reports 1.69.0 is supported for NDK r18b. I'm under Windows 7.

即使据报道这是可行的,但在尝试运行提供的脚本时我仍然遇到许多问题:

Even if this is reported as working, I encounter many problems when trying to run the provided script:

  • 下载的Boost 1.69.0
  • 下载的源文件
  • 修改后的BOOST_SRC_DIR指向包含"1.69.0"增强文件夹的文件夹
  • 修改后的ANDROID_NDK_ROOT指向ndk文件夹
  • 修改后的ABIS ="armeabi-v7a,x86"
  • 修改后的LINKAGE ="static"
  • 将Cygwin添加到了我的路径(因为这是我需要运行的.sh文件)
  • doIt.sh 得到了非阻塞错误:
  • Downloaded boost 1.69.0
  • Downloaded sources
  • Modified BOOST_SRC_DIR to point to folder containing "1.69.0" boost folder
  • Modified ANDROID_NDK_ROOT to point to ndk folder
  • Modified ABIS="armeabi-v7a,x86"
  • Modified LINKAGE="static"
  • Added Cygwin to my path (as this is a .sh file I need to run)
  • Ran doIt.sh Got non blocking errors:
  -nLe fichier sp?cifi? est introuvable.
  ERROR: Unsupported HOST_TAG: windows-x86_64

  • 然后我遇到了最终错误
  • ## COMMAND: mkdir /tmp/ndk-/tmp/build-11600/build-boost/armeabi-v7a/llvm/host-bin
    ## COMMAND: ./bootstrap.sh --with-toolset=cc  Building Boost.Build engine
    with toolset cc...    Failed to build Boost.Build build engine    Consult
    'bootstrap.log' for more details  ERROR: Could not bootstrap Boost build
    

    'bootstrap.log'reports gcc: not found
    

    • 将MinGW添加到了我的PATH(以便找到gcc),然后重试:

      • Added MinGW to my PATH (to have gcc be found), then retried:

        现在我进入'bootstrap.log':

        Now I get in 'bootstrap.log':

        cc -o bootstrap/jam0命令.c编译.c常量.c调试.c execcmd.c框架.c函数.c glob.c哈希.c hdrmacro.c标头.c jam.c jambase.c jamgram. c list.c make.c make1.c object.c选项.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c变量.c modules.c字符串.c filesys.c Builtins.c class.c cwd.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 pathunix.c

        cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.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 pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.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 pathunix.c

        command.c:1:0:抱歉,未实现:未在64位模式下编译

        command.c:1:0: sorry, unimplemented: 64-bit mode not compiled in

        我的PATH中没有'cc',应该在不知道的地方找到dunno

        There is no 'cc' available in my PATH, dunno where this is supposed to be found

        知道我可能在做什么错吗?

        Any idea what I may be doing wrong?

        推荐答案

        对不起,仅在Linux上正式受支持. Mac和Windows也应该可以正常工作,但是设置相关环境(例如cgwin或自制软件)的细节不在此项目尝试的范围之内.

        Sorry, only building on linux is officially supported. Mac and Windows should work fine too but details of setting up the relevant environments (eg cgwin or homebrew) is beyond the scope of what this project tries to do.

        如果要使用Windows作为主机,则有两个最简单的选择:

        If you want to use windows as a host you have two easiest options are:

        1. 使用虚拟机,例如VirtualBox或创建一个Linux虚拟机,您将在其中进行构建.

        1. Use virtual machines eg. VirtualBox or and create a linux virtual machine where you do the building.

        您还可以简单地下载并使用预编译的二进制文件我已经提供了

        You can also simply download and use the precompiled binaries I have made available

        无论您使用什么操作系统构建,都可以将生成的二进制文件复制到Windows并从那时开始使用,就好像您是在Windows上开始构建时一样(它们是为Android交叉编译的).

        No matter what os you use to build under, the resulting binaries can then be copied to windows and used from then on as if you had built on windows to start with (theyre cross compiled for android).

        这篇关于如何使用dec1/Boost-for-Android为带有NDK r18b的Android构建Boost 1.69.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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