1

My ubuntu is 14.04, the default gcc and g++ is 4.8, I installed gcc and g++ 4.4 manually, so how can I specify the older version of gcc to call when I compile a program?

Dongwei Wang
  • 111
  • 5
  • How did you install it? Usually you just call gcc-4.4, gcc-4.6, etc., but depending on how you installed, that may not work. – muru Oct 14 '14 at 01:40
  • I installed like this: sudo apt-get install gcc-4.4 g++4.4, so can I specify which gcc to use in make? – Dongwei Wang Oct 14 '14 at 01:52
  • because when I make cuda 4.0 samples, this was always an error says: unsupported GNU version! gcc 4.5 and up are not supported! – Dongwei Wang Oct 14 '14 at 01:54
  • Also related: http://askubuntu.com/questions/313288/how-to-use-multiple-instances-of-gcc http://askubuntu.com/questions/182027/how-to-use-gcc-4-7-in-place-of-4-6 – muru Oct 14 '14 at 01:58
  • I'd say you might be asking for problems as some of the bindings generated on the older versions of the compiler might not be compatible with the later operating system. So things using shared object libraries might have difficulty. Why not just use the latest version? – mdpc Oct 14 '14 at 02:09
  • because I met a problem "unsupported GNU version!gcc 4.5 and up are not supported!" when i compiled my cuda sample using gcc 4.8, so I have to use a lower version – Dongwei Wang Oct 14 '14 at 13:28

0 Answers0