• We did not send an email asking for donations - please read this post.

gcc does not work

S

Sanjay Rath

Guest
Hi All,
I am very fond of the C compiler in Linux. That is why I installed Linux Mint Olivia on my computer. But alas, the gcc command gives the following error, while compiling even the simplest C file:

[4][email protected]:~ > gcc Documents/MYCIRCLE.C
gcc: error trying to exec 'cc1plus': execvp: No such file or directory

Somebody suggested, this is happening because the gcc was not installed cleanly. Hence, I reinstalled Mint four times with all possible variation & precaution but no success.

Can anybody pleeease help!!!??
 


OP
K

KenJackson

Guest
On Fedora, cc1plus is in the gcc-c++ package. Mint is probably similar.

Your filename extension is capitalized, so I think gcc assumes it's a C++ file, not C. So I see three options:
  • Rename the file with a lower case extension: .c
  • Specify C on the commandline: gcc -x c MYCIRCLE.C
  • Install the gcc-c++ package (or similar)
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top