This is part of some instructions that I was given from a website helping me install CUDA on a hybrid system. I’m using ubuntu 12.04 LTS dual booted as well as having a hybrid graphics card system of Intel Integrated Graphics and NVIDIA GEForce GT 540M.
–external instructions–
The last thing that might cause issues is the version of gcc and g++. Long story short, make sure the pointers gcc and g++ in /usr/bin (and subsequently /usr/local/cuda/bin) are pointing to gcc-4.5 and g++-4.5 (can get these with apt-get) since they are the most recent versions supported by nvcc. Use the soft-link command to achieve this.
–back to me–
Assuming that downloading them with
apt-get install gcc-4.5 g++-4.5
will suffice for that part.
However, how do I make sure that the ‘pointers’ (how do I identify those?) are linked to the recently downloaded versions. I know the soft link command is
ln -s “target” “symbol” (one for gcc)
ln -s “target” “symbol” (one for g++)
I don’t want to do this wrong and I’m quite new to linux so please help me with what ‘target’ should look like as well as ‘symbol’ and I’ll be on my way.
Alex
It’s better to use
update alternativesfor managing default gcc for your system. For example, you have two versions 4.4 and 4.5. For CUDA you need 4.4.x version of gcc/ Lets set it system default:Soft links might be work, but I think,
update alternativesis the easiest way.