CUDA 5.0 examples on Debian

Installing CUDA-5.0 in my Debian host is ok, but I can not compile CUDA examples.
The compiling stopped with next error message:

/usr/local/cuda-5.0/lib64/ undefined reference to `std::__detail::_List_node_base::_M_unhook()@GLIBCXX_3.4.15'
/usr/local/cuda-5.0/lib64/ undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)@GLIBCXX_3.4.15'

There is additional information about my system:

~/NVIDIA_CUDA-5.0_Samples$ uname -a
Linux debian 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux

myHost@debian:~/NVIDIA_CUDA-5.0_Samples$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8) 

myHost@debian:~/NVIDIA_CUDA-5.0_Samples$ echo $PATH

myHost@debian:~/NVIDIA_CUDA-5.0_Samples$ echo $LD_LIBRARY_PATH 

myHost@debian:~/NVIDIA_CUDA-5.0_Samples$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2012 NVIDIA Corporation
Built on Fri_Sep_21_17:28:58_PDT_2012
Cuda compilation tools, release 5.0, V0.2.1221

I think that my problem is standard one, but google does not help me.
Thanks in advance.

According to the CUDA getting started guide your $LD_LIBRARY_PATH should contain both /usr/local/cuda/lib and /usr/local/cuda/lib64. Not sure if this will fix your problem.

A more likely cause of your problem is that your libstdc++ is too old for CUDA-5.0. According to this website ( your gcc-4.4.5 only supports up to GLIBCXX_3.4.13, while you need GLIBCXX_3.4.15 according to your error message. The easiest way to fix this is to install a newer version of gcc (4.6 or later). Hopefully this will solve your problem.

PS. To find out which GLIBCXX your current gcc supports, run the following command in the directory where is installed. Find this directory with the second command.

strings | grep GLIBCXX

thank you.
the problem was that i used stable debian branch, but downloaded CUDA respect only testing branch of debian. After my debian switching to testing branch i was able to compile the examples of CUDA code. it`s seems it should be version of CUDA for downloading for stable branch of debian, because, i think, not everybody use testing branch.

Hallo Andrey, I had the same problem on stable Debian after installing CUDA toolkit 32bit for ubuntu 11.10. Installing CUDA toolkit 32bit for ubuntu 10.04 solved my problem.