You may have learnt to code and run C programs in Windows platform. There, the application or executable files, .exe, were created using GCC compiler or the Turbo C compilers that run only in Windows.
Have you tried coding and running C programs on Fedora? If not, and if you are wondering how to install GCC compiler in Fedora 19, this article will help you. Here, a step-by-step procedure that will show you the easiest ways to setup GCC compiler in Fedora 19 as well as in an earlier version – Fedora 17.
Fedora seems to be maintaining a six month release schedule, especially in Mays and Novembers, to release new versions. Fedora 19, also codenamed “Schrödinger’s Cat”, was released on July 2, 2013, whereas Fedora 17 was released on May 29, 2012. The latest version of Fedora (as of this date), Fedora 20, was released on December 17, 2013.
Install GCC Compiler in Fedora 19:
The easiest way to install GCC compiler in Fedora 19 is by root. Simply execute the command given below.
yum install gcc
Here, you used YUM to setup GCC in Fedora 19 from terminal. Another way to install GCC is – download gcc-4.4.7-3.el6.x86_64 package from the web and execute the command below:
rpm -ivh gcc-4.4.7-3.el6.x86_64*
But, I wouldn’t recommend the 2nd method to newbie users because this will take you to a little long and complex procedure of downloading and installing GCC dependencies first.[divider]
Install GCC Compiler in Fedora 17:
If you are using Fedora 17, follow these procedure to install GCC compiler. First, open the terminal window. Then, type the commands given below, highlighted in bold blue letters. For this, internet connection is required.
You may have different user name on your computer; pramesh is the user name for my computer, and so the code for it is as given below.
[pramesh@localhost ~]$ su
Password:
[root@localhost pramesh]$ yum install gcc-c++
And that will automatically download the GCC compiler for Fedora. The compiler is installed in default path.
So, I hope these helped you to easily setup GCC compiler in Fedora 19 or Fedora 17. After you’ve completed the installation, you can try your first program in C on Fedora. If you have any queries regarding this post, mention them in the comments section below.