Cannot find -lcutil, although all paths are correct

When compiling some CUDA code, I get an error that libcutil could not be found, although I checked that the paths were correct.

Example

 $ 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. 

Even:

 $ ~/NVIDIA_GPU_Computing_SDK/C/lib$ ls libcutil_x86_64.a libparamgl_x86_64.a librendercheckgl_x86_64.a 
0
source share
2 answers

From the NVIDIA Forums :

On linux 64bit, you need to rename libcutil_x86_64.a to libcutil.a .

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

RENOUNCEMENT

As I twice stumbled upon this problem, I added the question and answer in the form of documentation.

+1
source

I tried the following:

 cp $(HOME)/NVIDIA_GPU_Computing_SDK/C/lib/libcutil_x86_64.a /usr/local/cuda/lib/libcutil.a 

and it works.

+3
source

Source: https://habr.com/ru/post/1446753/


All Articles