C Software installation and setup: For setting up the environment, you need the software tools available on your device i.e. text editor & C compiler.
C Software Installation and Setup
Text editor helps all programmers to type your program. Some of the editors used are Windows notepad, OS edit command, brief, Epsilon, EMACS and vim or vi. The files which were created by editors are called source files and they contain the program source codes. All the files in the C are saved with .c extension.
Before starting a program make sure that you are having an editor in your device, then save the file, compile it and execute it.
The source code written in your editor and saved will be compiled into machines language so that your CPU can actually execute the program as per instructions are given by us. A compiler compiles the source code into executable fine code. Most used compilers are c/c++, GNU compiler or you can also have other compilers depending upon your operating system.
C Installation on UNIX/ Linux
If you are using UNIX or Linux operating systems, check whether GCC has been installed on your device or not. For checking to use the following commands.
$ gcc -v
If you have a compiler installed, it will show us a message like this:
Using built-in specs.
Target: i386-redhat-linux Configured with: ../configure –prefix=/usr …….
Thread model: posix gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)
If your system doesn’t have GCC, you have to install it. We can get it from https://gcc.gnu.org/install/
C Software Installation on Windows
For installing GCC on windows, you need to install MinGW. For installing go to the MinGW home page i.e. www.mingw.org and follow the link to download page. Then Download the latest version of the MinGW installation program, which should be named MinGW-<version> .exe. If you are installing GW at a minimum, we must also install gcc-core, gcc-g++, bintuls.
Add the bin subdirectory of your MinGW installation to your PATH environment variable, so that you can specify these tools on the command line by their simple names. If the installation is complete you will be able to run gcc, g++, ar, ranlib, dlltool and several other GNU tools from the windows command line.
C Software Installation on Mac OS
If you are using Mac OS X, the easiest way to obtain GCC is to download the X code development environment from Apple’s website and follow instructions. Once you have X code setup then you can use GNU. X code is currently available at the developer. apple.com.