即使所有路径都正确,也找不到-lcutil [英] Cannot find -lcutil even though all the paths are correct

查看:84
本文介绍了即使所有路径都正确,也找不到-lcutil的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在编译某些CUDA代码时,出现错误,即使我检查路径是否正确也找不到libcutil.

When compiling some CUDA code, I get the error, that the libcutil cannot be found even though I checked that the paths are correct.

示例

$ nvcc mycudacode.cu -lcutil -o mycudaproject -I ~/NVIDIA_GPU_Computing_SDK/C/common/inc -L ~/NVIDIA_GPU_Computing_SDK/C/lib
/usr/bin/ld: cannot find -lcutil
compilation terminated.

即使:

$ ~/NVIDIA_GPU_Computing_SDK/C/lib$ ls
libcutil_x86_64.a  libparamgl_x86_64.a  librendercheckgl_x86_64.a

推荐答案

来自在Linux 64位上,必须将libcutil_x86_64.a重命名为libcutil.a.

On linux 64bit one has to rename libcutil_x86_64.a into libcutil.a.

因此cd进入文件夹$(HOME)/NVIDIA_GPU_Computing_SDK/C/lib/(或安装CUDA的位置),然后输入:cp libcutil_x86_64.a libcutil.a

So cd into the folder $(HOME)/NVIDIA_GPU_Computing_SDK/C/lib/ (or where you installed CUDA) and enter: cp libcutil_x86_64.a libcutil.a

免责声明

由于我已经两次偶然发现这个问题,所以我以文档形式添加了问题和答案.

As I already stumbled over this problem twice I added the question and the answer as a form of documentation.

这篇关于即使所有路径都正确,也找不到-lcutil的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆