Im trying to convert cpp files to so file. Following is my make file
我试图将cpp文件转换为so文件。以下是我的make文件
build:
ndk-build
install:
cp -r libs/armeabi-v7a/*.so ../src/main/jniLibs/armeabi-v7a/
cp -r libs/arm64-v8a/*.so ../src/main/jniLibs/arm64-v8a/
clean:
ndk-build clean
I tried running make
but Im getting the following error, make: ndk-build: No such file or directory
我尝试运行make但我得到以下错误,make:ndk-build:没有这样的文件或目录
Ofcourse I have installed ndk in my mac. what am i missing?
当然我已经在我的mac中安装了ndk。我错过了什么?
1 个解决方案
#1
1
From the error it looks like your mac system doesn't know where to find ndk-build. have you updated the PATH variable or its equivalent in mac.
从错误看起来你的mac系统不知道在哪里找到ndk-build。你有没有在mac中更新PATH变量或它的等价物。
Alternatively try to execute ndk-build with its complete path to check if its just a PATH issue.
或者尝试使用其完整路径执行ndk-build以检查它是否只是一个PATH问题。
Also note that you need to write Android.mk and Application.mk to compile the C++ code. You can refer this blog for more details http://web.guohuiwang.com/technical-notes/androidndk1
另请注意,您需要编写Android.mk和Application.mk来编译C ++代码。有关详细信息,请参阅此博客http://web.guohuiwang.com/technical-notes/androidndk1
#1
1
From the error it looks like your mac system doesn't know where to find ndk-build. have you updated the PATH variable or its equivalent in mac.
从错误看起来你的mac系统不知道在哪里找到ndk-build。你有没有在mac中更新PATH变量或它的等价物。
Alternatively try to execute ndk-build with its complete path to check if its just a PATH issue.
或者尝试使用其完整路径执行ndk-build以检查它是否只是一个PATH问题。
Also note that you need to write Android.mk and Application.mk to compile the C++ code. You can refer this blog for more details http://web.guohuiwang.com/technical-notes/androidndk1
另请注意,您需要编写Android.mk和Application.mk来编译C ++代码。有关详细信息,请参阅此博客http://web.guohuiwang.com/technical-notes/androidndk1