0
votes

I am new to OpenCL. I have written a democode [http://chopapp.com/#gh9jv1u]

I have installed the drivers and AMD APP SDK. I am using the following to compile:

gcc –l/opt/AMDAPP/include –L/opt/AMDAPP/lib/x86_64/ open.cpp –lOpenCL

ref:http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/introductory-tutorial-to-opencl/

I am getting the following message:

gcc: error: –l/opt/AMDAPP/include: No such file or directory
gcc: error: –L/opt/AMDAPP/lib/x86_64/: No such file or directory
gcc: error: –lOpenCL: No such file or directory

Kindly help!

2

2 Answers

1
votes

Got it working!

gcc -I/opt/AMDAPP/include -L/opt/AMDAPP/lib/x86_64 open.c -lOpenCL 

Hope this helps all nascent opencl programmers!

0
votes

You may check the path hint by gcc error. May be you SDK is not install in /opt/AMDAPP. And the last error, –lOpenCL: No such file or directory, make sure the libOpenCLXXX.so.XXX is in the /usr/lib, /usr/local/lib or /libs. It seems you haven't install the SDK properly.