[英]Compile/Build OpenCL program using AMD APP SDK on Linux
I am new to OpenCL. 我是OpenCL的新手。 I have written a democode [http://chopapp.com/#gh9jv1u]
我已经编写了一个演示代码[http://chopapp.com/#gh9jv1u]
I have installed the drivers and AMD APP SDK. 我已经安装了驱动程序和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/ 参考: 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! 希望这对所有新生的opencl程序员有所帮助!
You may check the path hint by gcc error. 您可以通过gcc错误检查路径提示。 May be you SDK is not install in /opt/AMDAPP.
可能是您未在/ opt / AMDAPP中安装SDK。 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. 最后一个错误
–lOpenCL: No such file or directory
,请确保libOpenCLXXX.so.XXX位于/ usr / lib,/ usr / local / lib或/ libs中。 It seems you haven't install the SDK properly. 似乎您没有正确安装SDK。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.