0

I am curious as how to install the CC command line compiler for my uni C++ projects I am not interested in g++ or gcc or whatever I want to use CC exactly so I get the desired affect of when I use it in class, however I class we use CentOS so I dont know if this makes a difference

2
Contributors
3
Replies
7
Views
8 Years
Discussion Span
Last Post by sknake
1

Are you sure its not using gcc? Most distros alias 'cc' to 'gcc' which is probably what is happening here.

sk@sk:~$ which cc
/usr/bin/cc
sk@sk:~$ ls -al `which cc`
lrwxrwxrwx 1 root root 20 Oct 15  2004 /usr/bin/cc -> /etc/alternatives/cc
sk@sk:~$ ls -al /etc/alternatives/cc
lrwxrwxrwx 1 root root 12 Feb  1  2007 /etc/alternatives/cc -> /usr/bin/gcc
sk@sk:~$ which gcc
/usr/bin/gcc

In this case "cc" is a symlink to "/etc/alternatives/cc" which is a symlink to "/usr/bin/gcc".

What this means: cc=gcc.

0

Well if you type gcc you will see this:

sk@svn:~$ gcc
The program 'gcc' can be found in the following packages:
 * gcc
 * pentium-builder
Try: sudo apt-get install <selected package>
-bash: gcc: command not found

So you should probably:

sk@svn:~$ sudo apt-get install gcc

Edited by sknake: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.