Question

Can anyone suggest me where to download a GNU c++ compiler, which I can use in Ubuntu and also on Windows with Netbeans IDE, and also GNU tools.

Was it helpful?

Solution

If you are using any Linux/Unix/Solaris OS it is available unless you have explicitly not installed. That said, if you still wish to install GNU C++ compiler, use this command

sudo aptitude install build-essential 

and if you wish to download it on your windows, steps are here on Minimalist GNU for Windows

OTHER TIPS

Getting everything you need on Debian/Ubuntu is very easy:

sudo apt-get install build-essential 

What about using GCC ?

Quoting it's homepage :

The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, as well as libraries for these languages (libstdc++, libgcj,...).

It will definitly work on Ubuntu ; it's even provided through the package system (sorry, my system is in french) :

$ apt-cache show g++
Package: g++
...
Description-fr: Compilateur C++ du projet GNU
 Le compilateur C++ du projet GNU. Un compilateur C++ relativement portable
 et capable de bonnes optimisations.

(which translates to Description: The GNU C++ compiler. This is the GNU C++ compiler, a fairly portable optimizing compiler for C++. in English)

For informations about Windows support, you can have a look at : http://gcc.gnu.org/install/specific.html#windows

Something like MinGW or Cygwin will probably do :-)

Quoting MinGW's homepage :

MinGW, a contraction of "Minimalist GNU for Windows", is a port of the GNU Compiler Collection (GCC), and GNU Binutils, for use in the development of native Microsoft Windows applications.


For netbeans, I can't tell : I don't use it -- not for C++, at least...

For windows, you will want cygwin.

Use sudo apt-get install g++ on Ubuntu.

To install the gcc and g++ compilers, you will need the build-essential package. This will also install GNU make.

build-essential contains a list of packages which are essential for building Ubuntu packages including gcc compiler, make and other required tools.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install build-essential
$ gcc -v
$ make -v

Now, you should able to compile software using C / C++ compilers.

To install the manpages for c and c++ development, install the manpages-dev package.

https://help.ubuntu.com/community/InstallingCompilers

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top