2012-07-25 116 views
1

我使用NDK爲我的項目... 我android.mk文件NDK錯誤不能做NDK,建立

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) 

的錯誤,我GET-

[email protected]:~/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 

回答

1

好, 我得到了解決,這是因爲我給「LOCAL_PATH:= $(叫我 - dir)「兩次。我刪除了第二個」LOCAL_PATH:= $(call my-dir)「,問題解決了。