设置环境变量在Eclipse与Android NDK使用 [英] Setting environment variables in Eclipse to use with Android NDK
问题描述
我使用Android NDK与Eclipse的Windows上的cygwin。
在我的makefile我想在Eclipse中使用环境变量设置prebuild库的路径。
所以我做以下内容:
I use Android NDK with cygwin with Eclipse on Windows. In my makefile I want to set path of prebuild library using environment variable in eclipse. So I do the following:
和makefile中:
And in makefile:
LOCAL_SRC_FILES = $(QCAR_SDK_ROOT)build/lib/$(TARGET_ARCH_ABI)/libQCAR.so
LOCAL_EXPORT_C_INCLUDES := $(QCAR_SDK_ROOT)build/include
不过,我得到错误:
But I get error:
Android NDK: ERROR:jni/Android.mk:QCAR-prebuilt: LOCAL_SRC_FILES points to a missing file
/cygdrive/d/Development/Android/android-ndk-r7/build/core/prebuilt-library.mk:43: *** Android NDK: Aborting . Stop.
make: *** [all] Error 2
Android NDK: Check that jni//cygdrive/D/Development/Android/qcar-android-1-5-4-beta1/build/lib/armeabi/libQCAR.so exists or that its path is correct
在Makefile中尝试过定义变量直接,得到了相同的结果。
Tried defining variable in makefile directly, got the same result.
所以,很显然,这条道路是不是我想要的。如何设置正确的路径?
So, obviously, that path is not what I wanted. How do I set the proper path?
推荐答案
这就是previous NDK构建,谷歌固定NDK-9的问题。 更新的NDK的构建,支持绝对路径在LOCAL_SRC_FILES。
That's a problem of the previous NDK builds that Google fixed with NDK-9. "Updated ndk-build to support absolute paths in LOCAL_SRC_FILES."
查看发布说明: http://developer.android.com/工具/ SDK / NDK / index.html的
这篇关于设置环境变量在Eclipse与Android NDK使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!