Tag Archives: GCC compiler

Programming with gcc

GCC-GNU Compiler Collection version 4.6.0 is out!

GCC(GNU Compiler Collection, version 4.6 was released a day ago) is a compiler available free under GPL by GNU Foundation. it is cross platform and is written using c/c++. Actually GCC has a major role in the growth of open source/Free Software world, in the past few years.

A majority of C/C++ programmers uses GCC, on Linux based operating systems as well as on Windows/Mac OS X. Since I uses Ubuntu 10.10 as my primary desktop; I know how important ,the gcc is, for programming Fun. GCC is mainly used as a compiler for C,C++,java,Fortran,Pascal,Ada,Objective-C.

A lot of extra features can be added with help of freely available plugins. GCC is one of the best compiler for c programmers.

Programming with gcc

New Features in GCC 4.6

  • Support for GO Programming Language has been added
  • New Optimizer Levels(-Ofast) has been introduced
  • Improvements in compiler time and Memory Usage
  • other platform specific improvements

GCC vs 4.6.0 has released(on March 25,2011). Go here for Complete details on the features of GCC.

c and c++ programming in ubuntu 10.04

c and C plus plus programming on Ubuntu-linux

When it comes to programming(C/C++ or other ),Ubuntu 10.04 or any distribution of Linux is far better than Windows NT based Operating system(windows XP or Vista or 7).In general people uses TurboC++ on windows but in Ubuntu 10.04 advanced and much efficient compiler are available for compiling C or C++ programs.Some people or students think that programing in Linux is very tough(Actually they feel scary due to the shell Commands) but I assure you that it is nothing but a misconception.But now,I think the misconceptions are decreasing and they are becoming familiar with Ubuntu/linux environment.

Text Editor in Ubuntu 10.04
Since Ubuntu 10.04 uses GNOME as their default desktop so there is no need to worry about text editor because Gedit text editor is installed by default.It has many advanced features like Syntax coloring so it is well suited for programming.Another KDE based version is also available Kwrite,similar to gedit with lot of features.

C Compiler for Ubuntu 10.04

For C program there is a modern compiler GCC(GNU Compiler Collection) which you can use to compile C programs.To install gcc type following command at command line.(It may be installed already)
sudo apt-get install gcc

Compiling C program in Ubuntu 10.04
user1004@user1004-desktop:~/Desktop$ gcc abc.c
user1004@user1004-desktop:~/Desktop$ ./a.out

*********Hello! Mr.X it’s working Enjoy!!******

C++ Compiler for Ubuntu
For C++ programs you can use G++ compiler an advanced compiler with lot of features.To install G++ type following command at command line.
sudo apt-get install g++

Compiling C++ program in Ubuntu 10.04
user1004@user1004-desktop:~/Desktop$ g++ decbin2.cpp
user1004@user1004-desktop:~/Desktop$ ./a.out

Enter the decimal number to be converted
The Equivalent binary number is     010111

IDE(Integrated Developement Environment) for programming in C and C++
For programming in c++ these are the most widely used IDE’s

  • Kdevelop
  • Eclipse
  • Frama C
  • Anjuta

More details on available IDE on Ubuntu-Linux