在Eclipse中设置环境变量以与Android NDK一起使用 [英] Setting environment variables in Eclipse to use with Android NDK
问题描述
我在Windows上使用Android NDK with cygwin和Eclipse。
在我的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
但我收到错误:
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?
推荐答案
这是以前的NDK构建的问题,谷歌用NDK-9修复。 已更新ndk-build以支持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/tools/sdk/ndk/index.html
See the release notes here:http://developer.android.com/tools/sdk/ndk/index.html
这篇关于在Eclipse中设置环境变量以与Android NDK一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!