Ubuntu 11.10 SDK compile threadFenceReduction Failed to compile threadFenceReduction

Hi all

I have a fresh install of Ubuntu 11.10 using gcc --version and vith latest nvidia drivers

gcc-4.4 (Ubuntu/Linaro 4.4.6-11ubuntu2) 4.4.6 with the CUDA 4.0 SDK.

I have followed all instructions here:


and have:

-L/usr/lib/nvidia-current in my common.mk


/usr/local/cuda/bin on the PATH

have a GEFORCE 9500 but when I do a make in NVIDIA_GPU_Computing_SDK/C I get

make -C src/threadFenceReduction/ 

make[1]: Entering directory `/home/dev/NVIDIA_GPU_Computing_SDK/C/src/threadFenceReduction'

threadFenceReduction.cu: In function ‘int main(int, char**)’:

threadFenceReduction.cu:119:167: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘char*’ [-Wformat]

obj/x86_64/release/threadFenceReduction.cu_11.o: In function `getNumBlocksAndThreads(int, int, int, int&, int&)':

tmpxft_00003d8c_00000000-4_threadFenceReduction.compute_20.cudafe1.cpp:(.text+0xf7b): undefined reference to `max'

tmpxft_00003d8c_00000000-4_threadFenceReduction.compute_20.cudafe1.cpp:(.text+0xf87): undefined reference to `min'

obj/x86_64/release/threadFenceReduction.cu_11.o: In function `shmoo(int, int, int, int)':

tmpxft_00003d8c_00000000-4_threadFenceReduction.compute_20.cudafe1.cpp:(.text+0x144e): undefined reference to `min'

collect2: ld returned 1 exit status

make[1]: *** [../../bin/linux/release/threadFenceReduction] Error 1

make[1]: Leaving directory `/home/dev/NVIDIA_GPU_Computing_SDK/C/src/threadFenceReduction'

make: *** [src/threadFenceReduction/Makefile.ph_build] Error 2


GNU Make 3.81

Can anyone please help? Is this missing libraries or something else? I’d really like to get started with CUDA.

Thanks in advance :thanks: