C-programming - Installing c on linux os, Gcc install on linux
Installing c on linux os
It was difficult to install C in olden days, but no it has become very easy toinstall c / c++ compiler. GCC stands for GNU Compiler Collection. And it contains compilers for various languages such as C,C++,Java and so on. It is one of the most efficient free implementation of a compiler one can hope to get ones hands on and is available for multiple platforms and OSes including Windows.
To find what version of gcc is installed on your machine, type the below command
# gcc -v
If the gcc is package is already present it will print the gcc version or else
it will start installing the gcc and will install the package as below.
output:
[root@localhost]# gcc -v
bash: gcc: command not found...
Install package 'gcc' to provide command 'gcc'? [N/y]
* Running..
* Resolving dependencies..
* Installing packages..
The following packages have to be installed:
cpp-4.5.1-4.fc14.i686 The C Preprocessor
kernel-headers-2.6.35.13-92.fc14.i686 Header files for the Linux kernel for
use by glibc
glibc-devel-2.13-1.i686 Object files for development using standard C
libraries.
ppl-0.10.2-10.fc12.i686 The Parma Polyhedra Library: a library of
numerical abstractions
libmpc-0.8.1-1.fc13.i686 C library for multiple precision complex
arithmetic
glibc-headers-2.13-1.i686 Header files for development using standard C
libraries.
cloog-ppl-0.15.7-2.fc14.i686 Parma Polyhedra Library backend (ppl) based
version of the Cloog binaries
Proceed with changes? [N/y]
* Waiting for authentication..
* Waiting in queue..
* Running..
* Resolving dependencies..
* Downloading packages..
* Checking signatures..
* Testing changes..
* Installing packages..
* Scanning applications..
* Getting information..
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.5.1/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable- languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)
# gcc -v
Output:
Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.5.1/lto-wrapper Target: i686-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man -- infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla -- enable-bootstrap --enable-shared --enable-threads=posix --enable- checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind- exceptions --enable-gnu-unique-object --enable-linker-build-id --enable- languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-java- awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj- jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl -- with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux Thread model: posix gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)
The topic on C-programming - Installing c on linux os is posted by - Math
Hope you have enjoyed, C-programming - Installing c on linux osThanks for your time