Hi Dennis,

the error message states that the linker can't find OpenCL functions. 
Most likely you did not specify the correct OpenCL library in CMake. 
Please make sure that you pick the 32-bit OpenCL libraries for a 
32-bit-build and the 64-bit OpenCL libraries for a 64-bit build.

Best regards,
Karli


On 03/29/2017 08:08 AM, Dennis Zhang wrote:
> Hi,
>
>
>
> I download the Viennacl 1.7.1 from
> http://viennacl.sourceforge.net/viennacl-download.html
>
> my system is Win7 x64, I use CMake 3.8 to configure and generate it,
> it’s ok,
>
> then I use Visual Studio 2015 to build it, but failed, it reports many
> errors like below:
>
>
>
> libviennacl.obj : error LNK2019: unresolved external symbol
> _clGetDeviceIDs@24 referenced in function "public: class
> std::vector<class viennacl::ocl::device,class std::allocator<class
> viennacl::ocl::device> > __thiscall
> viennacl::ocl::platform::devices(unsigned __int64)"
> (?devices@platform@ocl@viennacl@@QAE?AV?$vector@Vdevice@ocl@viennacl@@V?$allocator@Vdevice@ocl@viennacl@@@std@@@std@@_K@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clGetDeviceInfo@20 referenced in function "public: class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > __thiscall
> viennacl::ocl::device::driver_version(void)const "
> (?driver_version@device@ocl@viennacl@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clCreateContext@24 referenced in function "private: void __thiscall
> viennacl::ocl::context::init_new(void)"
> (?init_new@context@ocl@viennacl@@AAEXXZ)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clReleaseContext@4 referenced in function "public: static void __cdecl
> viennacl::ocl::handle_inc_dec_helper<struct _cl_context *>::dec(struct
> _cl_context * &)"
> (?dec@?$handle_inc_dec_helper@PAU_cl_context@@@ocl@viennacl@@SAXAAPAU_cl_context@@@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clCreateCommandQueue@20 referenced in function "public: void __thiscall
> viennacl::ocl::context::add_queue(struct _cl_device_id *)"
> (?add_queue@context@ocl@viennacl@@QAEXPAU_cl_device_id@@@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clRetainCommandQueue@4 referenced in function "public: static void
> __cdecl viennacl::ocl::handle_inc_dec_helper<struct _cl_command_queue
> *>::inc(struct _cl_command_queue * &)"
> (?inc@?$handle_inc_dec_helper@PAU_cl_command_queue@@@ocl@viennacl@@SAXAAPAU_cl_command_queue@@@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clReleaseCommandQueue@4 referenced in function "public: static void
> __cdecl viennacl::ocl::handle_inc_dec_helper<struct _cl_command_queue
> *>::dec(struct _cl_command_queue * &)"
> (?dec@?$handle_inc_dec_helper@PAU_cl_command_queue@@@ocl@viennacl@@SAXAAPAU_cl_command_queue@@@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clCreateBuffer@24 referenced in function "public: struct _cl_mem *
> __thiscall
> viennacl::ocl::context::create_memory_without_smart_handle(unsigned
> __int64,unsigned int,void *)const "
> (?create_memory_without_smart_handle@context@ocl@viennacl@@QBEPAU_cl_mem@@_KIPAX@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clReleaseMemObject@4 referenced in function "public: static void
> __cdecl viennacl::ocl::handle_inc_dec_helper<struct _cl_mem
> *>::dec(struct _cl_mem * &)"
> (?dec@?$handle_inc_dec_helper@PAU_cl_mem@@@ocl@viennacl@@SAXAAPAU_cl_mem@@@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clCreateProgramWithSource@20 referenced in function "public: class
> viennacl::ocl::program & __thiscall
> viennacl::ocl::context::add_program(class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> > const &,class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > const &)"
> (?add_program@context@ocl@viennacl@@QAEAAVprogram@23@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clCreateProgramWithBinary@28 referenced in function "public: class
> viennacl::ocl::program & __thiscall
> viennacl::ocl::context::add_program(class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> > const &,class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > const &)"
> (?add_program@context@ocl@viennacl@@QAEAAVprogram@23@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clReleaseProgram@4 referenced in function "public: static void __cdecl
> viennacl::ocl::handle_inc_dec_helper<struct _cl_program *>::dec(struct
> _cl_program * &)"
> (?dec@?$handle_inc_dec_helper@PAU_cl_program@@@ocl@viennacl@@SAXAAPAU_cl_program@@@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clBuildProgram@24 referenced in function "public: class
> viennacl::ocl::program & __thiscall
> viennacl::ocl::context::add_program(class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> > const &,class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > const &)"
> (?add_program@context@ocl@viennacl@@QAEAAVprogram@23@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clGetProgramInfo@20 referenced in function "public: class
> viennacl::ocl::program & __thiscall
> viennacl::ocl::context::add_program(class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> > const &,class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > const &)"
> (?add_program@context@ocl@viennacl@@QAEAAVprogram@23@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clGetProgramBuildInfo@24 referenced in function "public: class
> viennacl::ocl::program & __thiscall
> viennacl::ocl::context::add_program(class std::basic_string<char,struct
> std::char_traits<char>,class std::allocator<char> > const &,class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > const &)"
> (?add_program@context@ocl@viennacl@@QAEAAVprogram@23@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
>
> 16>libviennacl.obj : error LNK2019: unresolved external symbol
> _clCreateKernelsInProgram
>
>
>
> how about these errors?
>
>
>
> Best Regards,
>
> Dennis Zhang (#5655)
>
>
>
>
>
> 保密声明:
> 本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何
> 未经授权的查阅、使用、复制或转发。
> /CONFIDENTIAL NOTE: /
> /This email contains confidential or legally privileged information and
> is for the sole use of its intended recipient. Any unauthorized review,
> use, copying or forwarding of this email or the content of this email is
> strictly prohibited./
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> ViennaCL-support mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/viennacl-support
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
ViennaCL-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/viennacl-support

Reply via email to