ddemidov / vexcl

VexCL is a C++ vector expression template library for OpenCL/CUDA/OpenMP
http://vexcl.readthedocs.org
MIT License
701 stars 81 forks source link

Linking Issue!! #285

Closed kafi350 closed 3 years ago

kafi350 commented 3 years ago

Hello,

I was trying to link vexCL with and existing OpenCL project and it fails whenever i do the

include <vexcl/vexcl.hpp>

I am attaching the error in a text file.

Error.txt

Please let me know what's actually the issue as I tried almost all ways possible to resolve it.

ddemidov commented 3 years ago

It does not look like a linking error, it fails to compile judging by the log you attached.

How exactly are you building the project (command line with all the flags)? Can you reproduce the same issue with a minimal compilable example and post is here (again, both source code and the command line you use for building)?

ddemidov commented 3 years ago

The log says cl::Error type is undefined, but it should come from <CL/cl.hpp>, which should come from your OpenCL SDK (it is also provided at https://github.com/ddemidov/vexcl/tree/master/CL for convenience).

kafi350 commented 3 years ago

lol

Even If I try the normal initialization of VexCL the same error occurs.

ddemidov commented 3 years ago

Try to define the preprocessor macro CL_TARGET_OPENCL_VERSION=120.

kafi350 commented 3 years ago

It worked without changing the version. I did a clean openCL installation and Boost.Compute installation. Now it is building. Thank you!