Question about GCC.

Post about everything you want - even if it is not related to programming or this site.

Moderator: Board moderators

Post Reply
donatello
New poster
Posts: 8
Joined: Tue Mar 07, 2006 3:08 pm

Question about GCC.

Post by donatello »

Can I install another version of GCC (I want to use the judge's version 2.95) but I want to keep the newer version as well for other contests) in parallel and use both together (with say different commands)?
misof
A great helper
Posts: 430
Joined: Wed Jun 09, 2004 1:31 pm

Post by misof »

Yes. In fact, under most linux distributions this is a common thing, and it is directly supported by the packaging system. You will have several binaries called gcc-version, and a symbolic link gcc pointing to one of them, the default one.

Code: Select all

[misof@element]:~$ ls -al /usr/bin/gcc /usr/bin/gcc-*
lrwxrwxrwx  1 root root     7 Dec 27 20:00 /usr/bin/gcc -> gcc-4.0
-rwxr-xr-x  1 root root 69960 Mar 10  2004 /usr/bin/gcc-2.95
-rwxr-xr-x  1 root root 74056 Apr  8  2002 /usr/bin/gcc-3.0
-rwxr-xr-x  1 root root 81648 Sep 16 13:59 /usr/bin/gcc-3.3
-rwxr-xr-x  1 root root 88848 Jan 22 19:36 /usr/bin/gcc-3.4
-rwxr-xr-x  1 root root 93008 Jan 29 04:52 /usr/bin/gcc-4.0
Post Reply

Return to “Off topic (General chit-chat)”