Linux Scroll

Just another WordPress.com site

GNU compiler GCC

Gcc

Gcc is the acronym for GNU compiler collection created by the GNU project. This is a collection of integrated software capable of compiling various programming languages including C, C + +, Objective-C, Java, Ada and Fortran. It is used for the enhancement of all freeware. Linux OS depend directly of the GCC function.

The abbreviation GCC is used for three different entities:

* 1. The complete collection of compilers;
* 2. Part common to all compilers;
* 3. the C compiler itself.

To refer specifically to the compilers of each language, it refers as:

* GCC for C
* G++ for C++
* GCJ for Java
* GNAT for Ada
* Gfortran for Fortran
* GPC for Pascal
* GHDL for VHDL

GCC also has a tool for debugging, GNU Debugger (gdb). Although not part of GCC, Valgrind is preferred for more in depth testing , particularly to search for memory leaks.

GNU Debugger (gdb) is the debugging tool for GNU. However despite that Valgrind is not compiled with GCC, it is the most commonly used for serious troubleshoot.
Syntax GCC

Below are the two main commands of gcc for c :

$ gcc mysource.c

==> creates executable a.out to be launched with../a.out.

$ Gcc-o-name_of_program c mysource.c

==> The argument o-enables you to choose the name of the executable that will emerge from this compilation.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: