/usr/bin/ld: cannot find -lcutil_x86_64

I am getting following error while trying to make one of the example projects.

/usr/bin/ld: cannot find -lcutil_x86_64
collect2: ld returned 1 exit status
make: *** […/…/bin/linux/release/transpose] Error 1

Any clues ? I running it on a Kubuntu.

Try adding -L/path_to_sdk/NVIDIA_GPU_Computing_SDK/C/lib to the link command, where ‘path_to_sdk’ depends on where you installed the sdk.
Make sure that you have compiled the SDK first.

N.

When you have not compiled the SDK, the library might not yet have been created. To create this lib, go to path_to_sdk/NVIDIA_GPU_Computing_SDK/C/common and type “make”.
BTW: If then shrutil_x86_64 is missing, make it from the folder path_to_sdk/NVIDIA_GPU_Computing_SDK/shared -> Makefile

I think, then making the SDK examples will work (using its Makefile) without adding the library path to the link command.

Hi, Nico.

can you tell me how to “adding -L/path_to_sdk/NVIDIA_GPU_Computing_SDK/C/lib to the link command” ?

Hi, Nico.

can you tell me how to “adding -L/path_to_sdk/NVIDIA_GPU_Computing_SDK/C/lib to the link command” ?

Hi cho,

You need to change your compilation line from, for example:

g++ -o application main.cpp -lcutil

to:

g++ -o application main.cpp -L/home/cho/NVIDIA_GPU_Computing_SDK/C/lib -lcutil

The “-l” tell the compiler to look for a library and the “-L” tells it where to do the search (which is what you are probably missing).

Just make sure that something that resembles ‘libcutil.a’ exists in the directory which you give it.

For example, on my machine:

stefano@swarm:~$ locate cutil_x86_64

/home/stefano/NVIDIA_GPU_Computing_SDK/C/lib/libcutil_x86_64.a

If you cannot find the necessary library then make sure you have compiled the SDK examples.

I hope that helps you. Good luck.

-Stefano

Hi cho,

You need to change your compilation line from, for example:

g++ -o application main.cpp -lcutil

to:

g++ -o application main.cpp -L/home/cho/NVIDIA_GPU_Computing_SDK/C/lib -lcutil

The “-l” tell the compiler to look for a library and the “-L” tells it where to do the search (which is what you are probably missing).

Just make sure that something that resembles ‘libcutil.a’ exists in the directory which you give it.

For example, on my machine:

stefano@swarm:~$ locate cutil_x86_64

/home/stefano/NVIDIA_GPU_Computing_SDK/C/lib/libcutil_x86_64.a

If you cannot find the necessary library then make sure you have compiled the SDK examples.

I hope that helps you. Good luck.

-Stefano