Open FdyCN opened 2 years ago
AFAIK Android officially does not support OpenCL so that header probably is not part of the NDK.
OpenCL support is not part of the NDK, but it's doable:
1/ clone this repository and include include CL/opencl.h to your project like this
CXXFLAGS += -I./OpenCL-Headers/include
2/ copy libOpenCL.so from your phone (usual location are /system/vendor/lib64 or /system/vendor/lib) and link it
LDFLAGS += -lOpenCL -L./OpenCL_redist/lib
now it should compile fine and you can test it via Termux
export LD_LIBRARY_PATH="/system/vendor/lib64"
./run_your_binary
Hi guys, i got a problem. when I include opencl.hpp in my project. BUT, when i build executable for android 64 os using NDK. Here comes a compiling error, happened at this line:
my ndk version is : r22b `/Users/admin/Desktop/Demo/third_party/CL/opencl.hpp:530:10: fatal error: 'CL/opencl.h' file not found
include <CL/opencl.h>
` i wonder why it's wrong? is there no matched head in target platform? and how can i fix it?
Please help me and thanks a lot!