This warning often occurs when trying to link 64-bit code to a 32-bit library, see this question: Skipping incompatible libraries during compilation .
You need to select 2 library files:
$CUDA_HOME/lib/libcudart.so , 32-bit version of the cudart library.$CUDA_HOME/lib64/libcudart.so , 64-bit cudart library.
(in your case $CUDA_HOME is /usr/local/cuda-5.0 )
Basically, the linker first finds the 32-bit library (the -L parameters are executed in order) and returns this warning even if it finishes searching for the corresponding library.
You probably need to add $CUDA_HOME/lib64 in the LD_LIBRARY_PATH environment LD_LIBRARY_PATH to $CUDA_HOME/lib so that ld can find the right library for your 64-bit architecture up to the 32-bit version.
source share