I am using Matlab R2008a in Ubuntu 8.10 and I get the following error when I try to make.
[b]$ make -lcudart
/usr/local/matlab/bin/mex CFLAGS=’-fPIC -D_GNU_SOURCE -pthread -fexceptions’ COPTIMFLAGS=’-O3 -funroll-loops -msse2’ fft2_cuda.c
-I/usr/local/cuda/include -L/usr/local/cuda/lib -lcufft -Wl,-rpath,/usr/local/cuda/lib
fft2_cuda.o: In function
mexFunction': fft2_cuda.c:(.text+0x8d8): undefined reference to cudaMalloc’
fft2_cuda.c:(.text+0x8f6): undefined reference to
cudaMemcpy' fft2_cuda.c:(.text+0x95e): undefined reference to cudaMemcpy’
fft2_cuda.c:(.text+0x9c4): undefined reference to `cudaFree’
collect2: ld returned 1 exit status
mex: link of ' "fft2_cuda.mexglx"' failed.
make: *** [fft2_cuda.mexglx] Error 1
I read that this is because the CUDA runtime library is missing and was advised to include -lcudart but I still seems to be getting the error.
Any help is greatly appreciated.