1

我正在为我的项目使用 NDK... 我的 android.mk 文件

LOCAL_PATH:=$(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE:= libfreeimage
LOCAL_SRC_FILES:=libfreeimage.a
include $(PREBUILT_STATIC_LIBRARY)

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE:= imageprocessing
LOCAL_SRC_FILES:= imageprocessing.cpp
LOCAL_STATIC_LIBRARIES:= libfreeimage
LOCAL_LDLIBS:= -lm -llog -ljnigraphicss
include $(BUILD_SHARED_LIBRARY)

我得到的错误 -

flock@QS57:~/Desktop/android-imagefilter-ndk$ /home/flock/ANDROID/android-ndk-r8/ndk-build
make: *** No rule to make target `/home/flock/ANDROID/android-ndk-r8/build/core/imageprocessing.cpp', needed by `obj/local/armeabi/objs/imageprocessing/imageprocessing.o'.  Stop.

我的文件层次结构......

jni-
  Android.mk 
  imageprocessing.cpp  
  libfreeimage.a
4

1 回答 1

1

好吧,我得到了解决方案,这是因为我给了“ LOCAL_PATH := $(call my-dir) ”两次。我删除了第二个“ LOCAL_PATH := $(call my-dir) ”,问题就解决了。

于 2012-07-25T04:43:36.223 回答