cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

kranti
Journeyman III

Problem with Hello World Example

Hi,

I am using a Ubuntu 9.10 system, with ATI Stream SDK 2 with OpenCL Support.

I got the hello_world example from the http://developer.amd.com/gpu/ATIStreamSDK/pages/TutorialOpenCL.aspx link.

The SDK is installed at /home/devuser/opencl/ati-stream-sdk-v2.2-lnx32

The kernel is placed in lesson1_kernels.cl, and the cpp code is in Hello.cpp

When I run the command gcc -o hello_world -I$ATISTREAMSDKROOT/include -L$ATISTREAMSDKROOT/lib Hello.cpp -lOpenCL, I get the follwoing message

devuser@devuser-desktop:~/Desktop/opencl/hello$ gcc -o hello -I$ATISTREAMSDKROOT/include -L$ATISTREAMSDKROOT/lib Hello.cpp -lOpenCL
/usr/bin/ld: cannot find -lOpenCL
collect2: ld returned 1 exit status

Pl help me out.

 

devuser@devuser-desktop:~/Desktop/opencl/hello$ gcc -o hello -I$ATISTREAMSDKROOT/include -L$ATISTREAMSDKROOT/lib Hello.cpp -lOpenCL /usr/bin/ld: cannot find -lOpenCL collect2: ld returned 1 exit status

0 Likes
4 Replies
liuk
Journeyman III

Try -L$ATISTREAMSDKROOT/lib/x86

0 Likes

Oh! how silly mistake was that.... thanks for solving it

0 Likes

One more small doubt, in  case I want to run the sample applications present in SDK, i do a 'make' with the make file provided. What command should I run in case I dont want to use the Makefile provided?

0 Likes

kranti,

refer to ATI Stream SDK Getting Started Guide.

0 Likes