lcuda error when make command in NVIDIA SDK

I have installed cuda 4.0 on my Ubuntu 12.04. When I run make in Nvidia GPU computational Sdk directory, I get the following…

/usr/bin/ld: error: cannot find -lcuda

 obj/i386/release/deviceQuery.cpp.o:deviceQuery.cpp:function main: error: undefined reference to 'cuDeviceGetAttribute'
 obj/i386/release/deviceQuery.cpp.o:deviceQuery.cpp:function main: error: undefined reference to 'cuDeviceGetAttribute'
  obj/i386/release/deviceQuery.cpp.o:deviceQuery.cpp:function main: error: undefined reference to 'cuDeviceGetAttribute'
  collect2: ld returned 1 exit status
   make[1]: *** [../../bin/linux/release/deviceQuery] Error 1
   make[1]: Leaving directory `/home/sai/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery'
   make: *** [src/deviceQuery/Makefile.ph_build] Error 2

What is lcuda. the SDK neeNVIDIA_GPU_Computing_SDKds libglut3-dev, but as it was not available in ubuntu 12.04 i have installed freeglut3-dev. Is this creating the problem. How this can be rectified…

libcuda is one of the cuda libraries.

freeglut has nothing to do with this issue. the linker just can’t find the library. you have to explicitly point it to the right path, either through environment variables or editing the cuda makefile. See for a solution:

https://devtalk.nvidia.com/default/topic/460386/cuda-programming-and-performance/ubuntu-lcuda-not-found/

had similar issue, Ubuntu 12.04 running cuda 5.0. (actually believe my SDK install was hosed)

Updated to Cuda 5.5 toolkit and SDK’s, ensured my paths were updated and this fixed the issue.