简体   繁体   中英

Compile/Build OpenCL program using AMD APP SDK on Linux

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!

Got it working!

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

Hope this helps all nascent opencl programmers!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM