ld: cannot find -lcutil(have make cuda sdk)
First, I have install cuda sdk 3.2 and make.
Then I can find "/opt/cuda3.2/cuda/sdk/C/lib/libcutil_x86_64.a"

I have
export CUDA_INSTALL_PATH=/opt/cuda3.2/cuda
export CUDA_SDK_PATH=/opt/cuda3.2/cuda/sdk
export LD_LIBRARY_PATH=/opt/cuda3.2/cuda/lib:/opt/cuda3.2/cuda/lib64
export PATH="/opt/cuda3.2/cuda/bin:$PATH

but when I make a cuda project, it still shown error as below
"/usr/bin/ld: cannot find -lcutil"
First, I have install cuda sdk 3.2 and make.

Then I can find "/opt/cuda3.2/cuda/sdk/C/lib/libcutil_x86_64.a"



I have

export CUDA_INSTALL_PATH=/opt/cuda3.2/cuda

export CUDA_SDK_PATH=/opt/cuda3.2/cuda/sdk

export LD_LIBRARY_PATH=/opt/cuda3.2/cuda/lib:/opt/cuda3.2/cuda/lib64

export PATH="/opt/cuda3.2/cuda/bin:$PATH



but when I make a cuda project, it still shown error as below

"/usr/bin/ld: cannot find -lcutil"

#1
Posted 02/14/2012 06:33 AM   
I answer the question of Myself....

because the project is based on cuda sdk 32bit
but my system is 64bit and i install cuda sdk 64bit

the key point is ! libcutil in sdk(32bit) and sdk(64bit) have different name
in sdk(32bit) it named libcutil.a; but in sdk(64bit) it named as libcutil_x86_64.a

so,the solution of my question is:

cp /opt/cuda3.2/cuda/sdk/C/lib/libcutil_x86_64.a /opt/cuda3.2/cuda/sdk/C/lib/libcutil.a

over.
I answer the question of Myself....



because the project is based on cuda sdk 32bit

but my system is 64bit and i install cuda sdk 64bit



the key point is ! libcutil in sdk(32bit) and sdk(64bit) have different name

in sdk(32bit) it named libcutil.a; but in sdk(64bit) it named as libcutil_x86_64.a



so,the solution of my question is:



cp /opt/cuda3.2/cuda/sdk/C/lib/libcutil_x86_64.a /opt/cuda3.2/cuda/sdk/C/lib/libcutil.a



over.

#2
Posted 02/14/2012 06:49 AM   
Scroll To Top