Friday, September 20, 2013
0 comments

Is it possibleto have GCC, G++ , Java on UBUNTU?

8:45 PM
In our college , K J Somaiya college of Engineering we have started using UBUNTU for all of our practical sessions.

Since all of us are new to this everyone had a doubt and facing difficulty in performing programs on this.
This tutorial is not written from scratch.
I would like to thank all people who
enlightened me about Linux and Open source.
This tutorial acknowledges the help of Ubuntu Community (Docs) and people at online forums who cleared
my doubts on compilers.





Installing compilers is one of the easiest things there out at Linux. It
may seem a bit tough and complicated in the beginning but apt-get
and Synaptic Package Manager simplify your work a lot. As a newbie
developer you would require a C/C++ and a Java compiler. Installing
them is a matter of few commands.
The GNU C and GNU C++ Compiler:
The GNU C compiler is also called gcc and C++ is called g++. You
may also require the GNU make utility. All of them can get installed
by getting the build-essential package.

Just use this command:
sudo apt-get install build-essential

The GNU Java Compiler:
Firstly note that this compiler is not the one provided by Sun. The GNU Java compiler is named as gcj. Just install the package gcj
To install the GNU Java bytecode interpreter, install the gij package.
To have gcj compile to executables, install libgcj6-dev

Use the command:
sudo apt-get install gcj gij libgcj6-dev

Now the question arises that many people get :

 Errors like “build-essential not found” are displayed.

Here is an alternate way of doing the same:
Most people want to use linux in GUI mode just like windows. If this the case then why use the terminal? Just open the Synaptic Package Manager and search for the package gcc. Select the package, some more packages will be highlighted and will be asked to also be included in the install process. These are dependencies. Select them also and click on Apply. The packages are download and installed. To install g++,make and gcj just do the same as above mentioned for gcc package.

Now it would be working.!!

0 comments:

Post a Comment

Feature

 
Toggle Footer
Top