Compilation problems after installing CUDA

On Linux Mint Nadia 64-bit, after having installed CUDA I’m finding that it seems to require both g++ and gcc to be of an older version. However which symlinks am I supposed to direct to my older version? I’ve tried the links under /usr/bin and adding symlinks under /usr/local/cuda/bin.

Linux Mint is very similar to Ubuntu. The way I did it myself it I installed gcc/g++ 4.4 and used update-alternatives to select those as default. It’s a lot cleaner than dealing with symlinks and changing the default if you need to afterwards is very simple.

See for example step 2 here:


Unfortunately the cuda toolkit does not wokr with the lates version of compilers. One thing you could do is to install the older versions of gcc and make symbolic links to them, though you should revert to the newer versions when you make the OS updates.