Hardware specs :
Core: Intel Core i7 2600
GPU: Nvidia Geforce Gtx-580
Software environment:
IDE 1: QT 4.8
IDE 2: Visual Studio 2013
OS: Windows 7
Compiler for QT: mingw32-g+.exe
Compiler for VS: cl.exe
SDK: Intel OpenCL Code builder 2015, v 1.3.0.43
Goal: Have a 32bit build application in QT4.8 using OpenCL and mingw32-g++ compiler.
Problem:
Building a simple hello world program that reference any opencl methods, I get an undefined reference.
examples:
In QT
undefined reference to clGetPlatformIDs@12
In VS
undefined reference to _clCreateBuffer@24 referenced in function _main
What I have done:
- reference compiler to includes of intel includes =>C:\Intel\INDE\code_builder_5.0.0.43\include
- reference linker to intel librarie OpenCL.lib=> C:\Intel\INDE\code_builder_5.0.0.43\lib\x86
Notes:
In visual studio I get to compile properly. but building (compile + link) I get the error. And this linking only works well if I build for a x64 platform, and reference the VS IDE to the x64 libraries. C:\Intel\INDE\code_builder_5.0.0.43\lib\x64 instead
Questions:
1. What am I doing wrong? How to get it to work?
2. Does the OpenCL libraries really support x86 platforms? I dumpbin the libraries for both platform, and the symbols name were differnent. in x64 they had for example clGetPlatformIDs and in x86 library _clGetPlatformIDs@12.
3. My platform is openCL 1.2, Should I be put the visual studio include path to a opencl 1.2 header files? instead of the ones came with the sdk? I assume they are for opencl 2.1