我想使用 android NDK 和 Cmake 生成我的 android 本机应用程序,因此,我已经下载了android-cmake工具链。
Cmake 成功生成了我的项目,但是当我尝试进入生成目录并尝试运行“make”时,出现以下错误:
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ldz/Desktop/myProject
[ 1%] Building CXX object Project/src/Main/Core/CMakeFiles/Core.dir/Main/Main.cpp.o
arm-linux-androideabi-g++: error: unrecognized command line option '-stdlib=libc++'
我不知道这里出了什么问题,我的项目使用 C++11,这是我的g++ --版本 result:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
Thanks!
要使用 Cmake 构建 Android NDK 项目并创建 APK,您应该执行以下操作:
- 您应该使用而不是使用 android-cmaketaka-no-me 的叉子.
- 然后使用来自 Pixellight 的 Apk.cmake。还从此存储库复制 [AndroidManifest.xml.in、LoadLibraries.java.in、strings.xml.in]。
- 有一个像这样的 CMakeLists.txt :
cmake_minimum_required(VERSION 2.8.3)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)