我正在做一个增强现实程序。我被交给了这个项目,我是 cygwin 和 android 编程的新手。我必须使用 cygwin 来编译我的一个 cpp 文件。但是,当我在 cygwin 上进行 ndk-build 时,会出现此错误:
$ ndk-build
Android NDK: ERROR:/cygdrive/c/project/jni/Android.mk:QCAR-prebuilt: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /cygdrive/c/project/jni//../../../build/lib/armeabi/libQCAR.so exists or that its path is correct
/cygdrive/c/android-ndk-r8b/build/core/prebuilt-library.mk:43: *** Android NDK: Aborting . Stop.
这是我的 android.mk 代码:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := QCAR-prebuilt
LOCAL_SRC_FILES = /../../../build/lib/$(TARGET_ARCH_ABI)/libQCAR.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../build/include
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := ImageTargets
# The TARGET_PLATFORM defines the targetted Android Platform API level
TARGET_PLATFORM := android-5
# This variable determines the OpenGL ES API version to use:
# If set to true, OpenGL ES 1.1 is used, otherwise OpenGL ES 2.0.
USE_OPENGL_ES_1_1 := false
# Set OpenGL ES version-specific settings.
ifeq ($(USE_OPENGL_ES_1_1), true)
OPENGLES_LIB := -lGLESv1_CM
OPENGLES_DEF := -DUSE_OPENGL_ES_1_1
else
OPENGLES_LIB := -lGLESv2
OPENGLES_DEF := -DUSE_OPENGL_ES_2_0
endif
LOCAL_CFLAGS := -Wno-write-strings $(OPENGLES_DEF)
LOCAL_LDLIBS := \
-llog $(OPENGLES_LIB)
LOCAL_SHARED_LIBRARIES := QCAR-prebuilt
LOCAL_SRC_FILES := ImageTargets.cpp SampleUtils.cpp Texture.cpp
LOCAL_ARM_MODE := arm
include $(BUILD_SHARED_LIBRARY)**
我不是编程专家,所以我需要一些指导。