I’m getting the following error when I try to compile any example. I have an 8600 GTS, latest driver, latest toolkit, and OpenSuSE 10.3 beta 3. I removed the define for _GLIBCXX_VISIBILITY(V) and it seems to get past this.
gatoatigrado@oliver:~/NVIDIA_CUDA_SDK/projects/matrixMul> make
"/usr/include/c++/4.2.1/i586-suse-linux/bits/c++config.h", line 149: error:
expected a "{"
namespace std __attribute__ ((__visibility__ ("default"))) {
^
"/usr/include/c++/4.2.1/cstddef", line 53: error: expected a "{"
namespace std __attribute__ ((__visibility__ ("default"))) {
^
"/usr/include/c++/4.2.1/cstdlib", line 104: error: expected a "{"
namespace std __attribute__ ((__visibility__ ("default"))) {
^
"/usr/include/c++/4.2.1/cstdlib", line 161: error: expected a "{"
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
^
"/usr/include/c++/4.2.1/cstdlib", line 203: error: expected a "{"
namespace std __attribute__ ((__visibility__ ("default"))) {
^
5 errors detected in the compilation of "/tmp/tmpxft_00001570_00000000-3.ii".
make: *** [obj/release/matrixMul.cu_o] Error 255
What you can do is, rather than modifying system-wide header files,
(1) install gcc/g++ 4.1,
(2) create symbolic links in your CUDA bin directory to the gcc/g++ 4.1 executables,
(if you have CUDA executables installed in /path/to/your/cuda/bin)
ln -s /usr/bin/gcc-4.1 /path/to/your/cuda/bin/gcc
ln -s /usr/bin/g++-4.1 /path/to/your/cuda/bin/g++
(3) give --compiler-bindir=/PATH/TO/YOUR/CUDA/BIN option whenever you run nvcc