NDK在Android Studio中编译库时遇到问题 当我运行ndk-build命令时,会引发一个问题:
8 warnings generated.
[arm64-v8a] SharedLibrary : libFerrugemLib.so
C:/Android/Sdk/ndk-bundle/build//../toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -lOpenCL
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [obj/local/arm64-v8a/libFerrugemLib.so] Error 1
make: write error
这是我的Android.mk
LOCAL_PATH := $(call my-dir)
LOCAL_C_INCLUDES += PATH_TO_CL_FOLDER
include $(CLEAR_VARS)
LOCAL_MODULE := decodeYUV420SP
LOCAL_SRC_FILES := decodeYUV420SP.c
LOCAL_LDLIBS := -llog -ljnigraphics
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := FerrugemLib
LOCAL_SRC_FILES := FerrugemLib.c
LOCAL_LDLIBS := -lOpenCL
LOCAL_LDLIBS += -llog -ljnigraphics
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
include $(BUILD_SHARED_LIBRARY)
APP_OPTIM := debug
LOCAL_CFLAGS := $(call my-dir)
有人可以帮助您从lOpenCL中执行此命令