【问题标题】:How to build boost 1.69.0 for Android with NDK r18b using dec1/Boost-for-Android?如何使用 dec1/Boost-for-Android 使用 NDK r18b 为 Android 构建 boost 1.69.0?
【发布时间】:2019-01-23 09:21:42
【问题描述】:

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

即使这被报告为有效,我在尝试运行提供的脚本时也会遇到很多问题:

  • 已下载 boost 1.69.0
  • 已下载的资源
  • 修改了 BOOST_SRC_DIR 以指向包含“1.69.0”boost 文件夹的文件夹
  • 修改了 ANDROID_NDK_ROOT 以指向 ndk 文件夹
  • 修改 ABIS="armeabi-v7a,x86"
  • 修改了 LINKAGE="static"
  • 将 Cygwin 添加到我的路径中(因为这是我需要运行的 .sh 文件)
  • doIt.sh 出现非阻塞错误:
  -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),然后重试:

    现在我进入“bootstrap.log”:

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 list.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 位模式未编译

我的 PATH 中没有可用的“cc”,不知道应该在哪里找到它

知道我做错了什么吗?

【问题讨论】:

    标签: android c++ boost android-ndk


    【解决方案1】:

    抱歉,官方只支持在 linux 上构建。 Mac 和 Windows 也应该可以正常工作,但是设置相关环境(例如 cgwin 或 homebrew)的细节超出了本项目试图做的范围。

    如果您想使用 windows 作为主机,您有两个最简单的选择:

    1. 使用虚拟机,例如。 VirtualBox 或创建一个 linux 虚拟机,您可以在其中进行构建。

    2. 您也可以直接下载并使用我提供的precompiled binaries

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

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-14
    • 1970-01-01
    相关资源
    最近更新 更多