Using Boost Compute with ArrayFire
Hi,
I am trying to run a code which uses functions from both boost compute
library and arrayfire library. I am getting the following errors when I try
to build the code:
Scanning dependencies of target hello
[ 50%] Building CXX object CMakeFiles/hello.dir/hello.cpp.o
In file included from /opt/arrayfire/include/CL/cl.h:32,
from /usr/include/boost/compute/cl.hpp:19,
from /usr/include/boost/compute/system.hpp:20,
from
/usr/include/boost/compute/algorithm/accumulate.hpp:17,
from /usr/include/boost/compute/algorithm.hpp:18,
from /usr/include/boost/compute.hpp:14,
from /home/rcms/debruijn/arrayfire/hello.cpp:2:
/opt/arrayfire/include/CL/cl_version.h:34:104: note: #pragma message:
cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220
(OpenCL 2.2)
34 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not
defined. Defaulting to 220 (OpenCL 2.2)")
|
^
[100%] Linking CXX executable hello
/usr/bin/ld: CMakeFiles/hello.dir/hello.cpp.o: undefined reference to
symbol 'clGetDeviceIDs@@OPENCL_1.0'
/usr/bin/ld: /opt/arrayfire/lib64/libOpenCL.so.1: error adding symbols: DSO
missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/hello.dir/build.make:85: hello] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/hello.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
The code I am using is a very simple helloworld using functions from both
libraries.
#include <iostream>
#include
participants (1)
-
Muhammad Hassan Khan