[英]Problems with OpenCL
I have a problem in compiling simple program using openCL under Ubuntu. 我在Ubuntu下使用openCL编译简单程序时遇到问题。 I have downloaded the AMD stream SDK from the AMD site and I have installed it using the installation notes from the same site. 我已从AMD站点下载了AMD stream SDK,并已使用同一站点的安装说明进行了安装。 I have copied a simple hello world program from a OpenCL manual and I've tried to compile it using the command suggested from manual : 我从OpenCL手册中复制了一个简单的hello world程序,并尝试使用manual中建议的命令对其进行编译:
gcc -o hello -I '$AMDSTREAMSDKROOT/include' -L '$AMDSTREAMSDKROOT/lib/x86_64' hello.c ‐lOpenCL
but the answer from the compiler is 但是编译器的答案是
gcc: error: ‐lOpenCL: no such file or directory
Does anyone has any ideas about this problem? 有没有人对此问题有任何想法? Thanks 谢谢
You appear to be using strong quotes (single quotes), which will prevent the environment variable $AMDSTREAMSDKROOT
from being expanded. 您似乎使用了强引号 (单引号),这将阻止扩展环境变量$AMDSTREAMSDKROOT
。 Try using double-quotes instead: 尝试使用双引号代替:
gcc -o hello -I "$AMDSTREAMSDKROOT/include" -L "$AMDSTREAMSDKROOT/lib/x86_64" hello.c ‐lOpenCL
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.