Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find -lOpenCL on Android Studio (Compile Library) #3

Open
lucassardelari opened this issue Jan 10, 2019 · 1 comment
Open

Cannot find -lOpenCL on Android Studio (Compile Library) #3

lucassardelari opened this issue Jan 10, 2019 · 1 comment

Comments

@lucassardelari
Copy link

Hello friend, I'm trying to compile a project through Android Studio. But when I run the ndk build command, an exception occurs:

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

Could you help me compile the command-lOpenCL

@lucassardelari
Copy link
Author

The error continues to occur, I will post a larger log to note:

Android NDK: Found platform level in ./project.properties. Setting APP_PLATFORM to android-19. Android NDK: WARNING: APP_PLATFORM android-19 is higher than android:minSdkVersion 1 in ./AndroidManifest.xml. NDK binaries will *not* be compatible with devices older than android-19. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_p roblems.md for more information. [arm64-v8a] Compile : FerrugemLib <= FerrugemLib.c In file included from jni/FerrugemLib.c:15: In file included from jni\CL/cl.h:32: jni\CL/cl_version.h:34:9: warning: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2) [-W#pragma-messages] #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)") ^ jni/FerrugemLib.c:346:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ jni/FerrugemLib.c:535:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ jni/FerrugemLib.c:733:25: warning: 'clCreateCommandQueue' is deprecated [-Wdeprecated-declarations] openCLObjects->queue = clCreateCommandQueue(openCLObjects->context, openCLObjects->device, 0, &err); ^ jni\CL/cl.h:1760:72: note: 'clCreateCommandQueue' has been explicitly marked deprecated here cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED; ^ jni\CL/cl_platform.h:91:70: note: expanded from macro 'CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED' #define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED __attribute__((deprecated)) ^ jni/FerrugemLib.c:839:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ jni/FerrugemLib.c:944:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ jni/FerrugemLib.c:1977:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ jni/FerrugemLib.c:2034:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ 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 OpenCL: No such file or directory clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [obj/local/arm64-v8a/libFerrugemLib.so] Error 1
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant