cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

unrecovered
Journeyman III

Entering OpenCL went terribly wrong

Hi. I'm currentry trying to start exploring OpenCL and already have some issues i don't know how to resolve. Also I must say I've come here as a last resort, since 3 days of googling, reading manuals and changing IDEs/compilers doesn't do sh any good. So here's my problem:

g++ "-LC:\\Program Files (x86)\\AMD APP SDK\\3.0\\lib\\x86_64" -o project.exe "src\\huinya.o"

src\project.o: In function `getPlatformVersion':

C:/Program Files (x86)/AMD APP SDK/3.0/include/CL/cl.hpp:1688: undefined reference to `clGetPlatformInfo'

C:/Program Files (x86)/AMD APP SDK/3.0/include/CL/cl.hpp:1690: undefined reference to `clGetPlatformInfo'

src\huinya.o: In function `getDevicePlatformVersion':

C:/Program Files (x86)/AMD APP SDK/3.0/include/CL/cl.hpp:1697: undefined reference to `clGetDeviceInfo'

src\huinya.o: In function `cl::detail::ReferenceHandler<_cl_context*>::release(_cl_context*)':

C:/Program Files (x86)/AMD APP SDK/3.0/include/CL/cl.hpp:1607: undefined reference to `clReleaseContext'

src\huinya.o: In function `cl::detail::ReferenceHandler<_cl_command_queue*>::release(_cl_command_queue*)':

C:/Program Files (x86)/AMD APP SDK/3.0/include/CL/cl.hpp:1616: undefined reference to `clReleaseCommandQueue'

Now an explanation. I do evrything according to manual. I've installed AMD APP SDK(latest), set up environment, added path and included "include" folder, added "lib" folder into library path. Then I tried to build simple "hello world" program with the only addition in it: #include <CL/cl.hpp>. After that, i get this error.

You may think it's about building a 64-bit app with 32-bit builder(or vice versa). That would be so easy... But no. I've made sure of that. Several times. And tried all possible combinations. The error is the same. So obviously I do something wrong, but cannot figure what.

Things I've tried so far:

IDEs:

Eclipse

NetBeans

Visual Studio 2012

Compiling:

MinGW+MSYS

Cygwin

whatever VS use

My PC conf:

OS: Win7

Proc: Core i3-2310M

RAM: 6GB

Video: Radeon 6300M Series

Help me please, I'm desperate at this point 😞

0 Likes
1 Solution
dipak
Big Boss

It looks like linker was unable to find the symbols. Did you try with "-lOpenCL" option in the command line?

Regards,

View solution in original post

0 Likes
2 Replies
dipak
Big Boss

It looks like linker was unable to find the symbols. Did you try with "-lOpenCL" option in the command line?

Regards,

0 Likes

...half-year later i remembered i wrote my issue here And yeah, i edited my linker command and it compiles without complains. The only thing that bothers me is why this issue insn't that common. Since i wrote it, i changed PC, OS, did all the steps all over again... to find same result. THEN i at last remembered this post Isn't it an issue almost ANY new OCL user encounters?..

0 Likes