gcc does not work

Discussion in 'Command Line' started by Sanjay Rath, Sep 10, 2013.

  1. Sanjay Rath

    Sanjay Rath New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    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:

    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!!!??
  2. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,260
    Likes Received:
    428
    Trophy Points:
    83
    Rob likes this.
  3. KenJackson

    KenJackson Active Member

    Messages:
    129
    Likes Received:
    28
    Trophy Points:
    28
    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)

Share This Page