CUDA 6.0, MKL and icc 15.0 : Error in Makefile when linking

Hi all

I am trying to compile some CUDA and C files which compiled several years ago with CUDA 4.2 and an old version of icc. I am using the same Makefile where the CUDA and MKL path have been updated to use CUDA 6.0 and the last Intel Math Kernel Library (MKL) provided with icc 15.0. However I have multiple errors which I am showing later in this message. The Makefile (it is showed at the end of this message) seems to fail in the PCA entry, where the link with icc is made.

Does someone know what I am doing wrong? My system is Ubuntu Linux 14.04 LTS (64 bits). Thanks in advance.

The errors:

./build/metodos.o: En In function __cudaUnregisterBinaryUtil()': tmpxft_00006c25_00000000-3_metodos.cudafe1.cpp:(.text+0x13): reference to__cudaUnregisterFatBinary’ undefined
./build/metodos.o: En In function __sti____cudaRegisterAll_42_tmpxft_00006c25_00000000_6_metodos_cpp1_ii_0f02b8a8()': tmpxft_00006c25_00000000-3_metodos.cudafe1.cpp:(.text.startup+0xa): reference to__cudaRegisterFatBinary’ undefined
./build/GPUutil.o: En In function destAdditiveNoise(double*, double*, double*, int, int)': tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x2b6): reference tocudaConfigureCall’ undefined
tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x2ee): reference tocudaFree' undefined tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x2fb): reference tocudaFree’ undefined
tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x305): reference tocudaFree' undefined tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x312): reference tocudaFree’ undefined
tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x389): reference tocudaFree' undefined tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x403): reference tocudaConfigureCall’ undefined
tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x4a8): reference tocudaConfigureCall' undefined tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x5bb): reference tocudaFree’ undefined
tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x5c8): reference tocudaFree' undefined tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x5d5): reference tocudaFree’ undefined
./build/GPUutil.o: En In function estNoise(double*, double*, double*, int, int)': tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0xa96): reference tocudaConfigureCall’ undefined
tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0xace): reference tocudaFree' undefined tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0xadb): reference tocudaFree’ undefined
tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0xae5): reference tocudaFree' undefined tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0xaf2): reference tocudaFree’ undefined
tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0xb69): reference tocudaFree' undefined tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0xbe8): reference tocudaConfigureCall’ undefined
tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0xc8a): reference tocudaConfigureCall' undefined tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0xd84): reference tocudaFree’ undefined
tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0xd91): reference tocudaFree' undefined tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0xd9e): reference tocudaFree’ undefined
./build/GPUutil.o: En In function hysime(double*, double*, double*, int, int)': tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x17cf): reference tocudaFree’ undefined
tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x17dc): reference tocudaFree' undefined ./build/GPUutil.o:tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x17e9): more references to cudaFree’ undefined in the following
./build/GPUutil.o: En In function __cudaUnregisterBinaryUtil()': tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text+0x13): reference to__cudaUnregisterFatBinary’ undefined
./build/GPUutil.o: En In function __sti____cudaRegisterAll_42_tmpxft_00006c62_00000000_6_GPUutil_cpp1_ii_f81fb8b5()': tmpxft_00006c62_00000000-3_GPUutil.cudafe1.cpp:(.text.startup+0xa): reference to__cudaRegisterFatBinary’ undefined
./build/PCA_Kernels.o: En In function Ones(float*, int, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x3d): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x5e): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x76): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x8f): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function Reduction_vol(double*, double*, int*, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xc3): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xe0): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xf8): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x10e): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x127): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function dMean_Pixel(double*, double*, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x152): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x170): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x186): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x19e): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x1b7): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function Correlation(double*, double*, double*, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x1e3): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x200): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x218): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x22e): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x247): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function Update_Ab(float*, float*, float*, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x278): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x298): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x2b0): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x2c6): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x2de): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x2f7): reference tocudaLaunch’ undefined
./build/PCA_Kernels.o: En In function Compute_w(double*, double*, double*, double*, double*, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x32e): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x350): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x368): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x380): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x398): reference tocudaSetupArgument’ undefined
./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x3ae): more references tocudaSetupArgument' undefined in the following ./build/PCA_Kernels.o: En In function Compute_w(double*, double*, double*, double*, double*, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x3c7): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function Compute_w2(double*, double*, double*, int, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x3fd): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x420): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x438): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x44e): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x466): reference tocudaSetupArgument' undefined ./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x47e): more references tocudaSetupArgument’ undefined in the following
./build/PCA_Kernels.o: En In function Compute_w2(double*, double*, double*, int, int, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x49b): reference tocudaLaunch’ undefined
./build/PCA_Kernels.o: En In function Mean_Pixel(float*, float*, int, int, int, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x4dc): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x500): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x516): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x52e): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x546): reference tocudaSetupArgument’ undefined
./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x55e): more references tocudaSetupArgument' undefined in the following ./build/PCA_Kernels.o: En In function Mean_Pixel(float*, float*, int, int, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x57b): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function VolumeCalculation(double*, double*, double*, double, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x5be): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x5e0): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x5f8): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x610): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x626): reference tocudaSetupArgument' undefined ./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x63e): more references tocudaSetupArgument’ undefined in the following
./build/PCA_Kernels.o: En In function VolumeCalculation(double*, double*, double*, double, int, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x657): reference tocudaLaunch’ undefined
./build/PCA_Kernels.o: En In function NormalizeX(float*, float*, int, int, int, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x68c): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x6b0): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x6c6): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x6de): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x6f6): reference tocudaSetupArgument’ undefined
./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x70e): more references tocudaSetupArgument' undefined in the following ./build/PCA_Kernels.o: En In function NormalizeX(float*, float*, int, int, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x72b): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function Unmixing(float*, float*, float*, int, int, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x778): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x798): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x7b0): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x7c6): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x7de): reference tocudaSetupArgument' undefined ./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x7f6): more references tocudaSetupArgument’ undefined in the following
./build/PCA_Kernels.o: En In function Unmixing(float*, float*, float*, int, int, int, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x82b): reference tocudaLaunch’ undefined
./build/PCA_Kernels.o: En In function __device_stub__Z10Mean_PixelPfS_iiii(float*, float*, int, int, int, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x86c): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x890): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x8a8): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x8c0): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x8d8): reference tocudaSetupArgument’ undefined
./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x8ee): more references tocudaSetupArgument' undefined in the following ./build/PCA_Kernels.o: En In function __device_stub__Z10Mean_PixelPfS_iiii(float*, float*, int, int, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x90b): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function __device_stub__Z17VolumeCalculationPdS_S_dii(double*, double*, double*, double, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x94f): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x970): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x988): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x9a0): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x9b8): reference tocudaSetupArgument' undefined ./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x9d0): more references tocudaSetupArgument’ undefined in the following
./build/PCA_Kernels.o: En In function __device_stub__Z17VolumeCalculationPdS_S_dii(double*, double*, double*, double, int, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x9ed): reference tocudaLaunch’ undefined
./build/PCA_Kernels.o: En In function __device_stub__Z13Reduction_volPdS_Pii(double*, double*, int*, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xa24): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xa48): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xa60): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xa78): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xa91): reference tocudaLaunch’ undefined
./build/PCA_Kernels.o: En In function __device_stub__Z8UnmixingPfS_S_iiii(float*, float*, float*, int, int, int, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xace): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xaf0): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xb08): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xb20): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xb38): reference tocudaSetupArgument’ undefined
./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xb50): more references tocudaSetupArgument' undefined in the following ./build/PCA_Kernels.o: En In function __device_stub__Z8UnmixingPfS_S_iiii(float*, float*, float*, int, int, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xb89): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function __device_stub__Z9Compute_wPdS_S_S_S_i(double*, double*, double*, double*, double*, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xbcf): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xbf0): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xc08): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xc20): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xc38): reference tocudaSetupArgument' undefined ./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xc50): more references tocudaSetupArgument’ undefined in the following
./build/PCA_Kernels.o: En In function __device_stub__Z9Compute_wPdS_S_S_S_i(double*, double*, double*, double*, double*, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xc6d): reference tocudaLaunch’ undefined
./build/PCA_Kernels.o: En In function __device_stub__Z10Compute_w2PdS_S_iii(double*, double*, double*, int, int, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xcae): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xcd0): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xce8): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xd00): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xd18): reference tocudaSetupArgument’ undefined
./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xd30): more references tocudaSetupArgument' undefined in the following ./build/PCA_Kernels.o: En In function __device_stub__Z10Compute_w2PdS_S_iii(double*, double*, double*, int, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xd4d): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function __device_stub__Z11CorrelationPdS_S_i(double*, double*, double*, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xd84): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xda8): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xdc0): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xdd8): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xdf1): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function __device_stub__Z11dMean_PixelPdS_ii(double*, double*, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xe23): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xe40): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xe58): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xe70): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xe89): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function __device_stub__Z10NormalizeXPfS_iiii(float*, float*, int, int, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xebc): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xee0): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xef8): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xf10): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xf28): reference tocudaSetupArgument' undefined ./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xf3e): more references tocudaSetupArgument’ undefined in the following
./build/PCA_Kernels.o: En In function __device_stub__Z10NormalizeXPfS_iiii(float*, float*, int, int, int, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xf5b): reference tocudaLaunch’ undefined
./build/PCA_Kernels.o: En In function __device_stub__Z4OnesPfii(float*, int, int)': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xf8d): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xfb0): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xfc6): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0xfdf): reference tocudaLaunch' undefined ./build/PCA_Kernels.o: En In function __device_stub__Z9Update_AbPfS_S_ii(float*, float*, float*, int, int)’:
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x1018): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x1038): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x1050): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x1068): reference tocudaSetupArgument’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x107e): reference tocudaSetupArgument' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x1097): reference tocudaLaunch’ undefined
./build/PCA_Kernels.o: En In function __cudaUnregisterBinaryUtil()': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text+0x13): reference to__cudaUnregisterFatBinary’ undefined
./build/PCA_Kernels.o: En In function __sti____cudaRegisterAll_46_tmpxft_00006ca6_00000000_6_PCA_Kernels_cpp1_ii_3d5da610()': tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text.startup+0xb): reference to__cudaRegisterFatBinary’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text.startup+0x64): reference to__cudaRegisterFunction' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text.startup+0xa5): reference to__cudaRegisterFunction’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text.startup+0xe6): reference to__cudaRegisterFunction' undefined tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text.startup+0x127): reference to__cudaRegisterFunction’ undefined
tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text.startup+0x168): reference to__cudaRegisterFunction' undefined ./build/PCA_Kernels.o:tmpxft_00006ca6_00000000-3_PCA_Kernels.cudafe1.cpp:(.text.startup+0x1a9): more references to__cudaRegisterFunction’ undefined in the following
./build/PCA.o: En In function __cudaUnregisterBinaryUtil()': tmpxft_00006d6a_00000000-3_PCA.cudafe1.cpp:(.text+0x13): reference to__cudaUnregisterFatBinary’ undefined
./build/PCA.o: En In function __sti____cudaRegisterAll_38_tmpxft_00006d6a_00000000_6_PCA_cpp1_ii_main()': tmpxft_00006d6a_00000000-3_PCA.cudafe1.cpp:(.text.startup+0x21a): reference to__cudaRegisterFatBinary’ undefined
make: *** [PCA] Error 1

My Makefile

[code]MKL =1

#initial definitions (library paths et al.)

CUDA_PATH=/usr/local/cuda-6.0
MKLROOT=/home/emartel/intel/composer_xe_2015.0.090/mkl
BUILD_DIR=./build

####################
#includes
####################
#Cuda includes
CUDA_INCLUDE_DIR=-I. -I$(CUDA_PATH)/include

#BLAS includes
BLAS_INCLUDE_DIR=-I. -I$(MKLROOT)/include

####################
#library search paths
####################
CUDA_LIB_DIR=-L$(CUDA_PATH)/lib64

BLAS_LIB_DIR=-L$(MKLROOT)/lib/intel64 -L$(MKLROOT)/…/compiler/lib/intel64

####################
#libraries
####################
CUDALIBS=-lcublas
utilS= -lpthread -lm

####################
#other compilation flags
####################
CFLAGS= -Wwrite-strings

MKLFLAGS=-D __MKL
CUDAFLAGS=–gpu-architecture sm_20
LINKERFLAGS= -Wl,–start-group (MKLROOT)/lib/intel64/libmkl_intel_lp64.a (MKLROOT)/lib/intel64/libmkl_sequential.a (MKLROOT)/lib/intel64/libmkl_core.a (MKLROOT)/…/compiler/lib/intel64/libiomp5.a -Wl,–end-group

####################
#utilities
####################
io.o : io.c
icc (CFLAGS) -c -O3 io.c -o (BUILD_DIR)/io.o

#BLAS and LAPACK wrapper
util.o : util.c
icc (CFLAGS) (MKLFLAGS) (BLAS_INCLUDE_DIR) -c -O3 util.c -o (BUILD_DIR)/util.o

metodos.o : metodos.cu
nvcc (CUDAFLAGS) (CUDA_INCLUDE_DIR) -c -O3 metodos.cu -o $(BUILD_DIR)/metodos.o -lcudart

##################################

PCA files

##################################
GPUutil.o: GPUutil.cu
nvcc (CUDAFLAGS) (CUDA_INCLUDE_DIR) -c -O3 GPUutil.cu -o $(BUILD_DIR)/GPUutil.o

PCA_Kernels.o: PCA_Kernels.cu
nvcc (CUDAFLAGS) (CUDA_INCLUDE_DIR) -c -O3 PCA_Kernels.cu -o $(BUILD_DIR)/PCA_Kernels.o

PCA.o: PCA.cu
nvcc (CUDAFLAGS) (CUDA_INCLUDE_DIR) -c -O3 PCA.cu -o $(BUILD_DIR)/PCA.o

#everything is already compiled, this is just a call to the linker
PCA: io.o util.o metodos.o GPUutil.o PCA_Kernels.o PCA.o
icc (CFLAGS) (BUILD_DIR)/io.o (BUILD_DIR)/util.o (BUILD_DIR)/metodos.o (BUILD_DIR)/GPUutil.o (BUILD_DIR)/PCA_Kernels.o
(BUILD_DIR)/PCA.o \ (CUDA_LIB_DIR) (BLAS_LIB_DIR) (LINKERFLAGS) (utilS) (CUDALIBS) -o PCA