tags:

views:

331

answers:

6

hi can anyone suggest me where ro download a GNU c++ compiler, which i can use in ubuntu and also on windows with Netbeans IDE. and also GNU tools.

+3  A: 

For windows, you will want cygwin.

Steve Gilham
or perhaps http://www.mingw.org/
Gabe
Compilers under cygwin don't compile natively for Windows, they compile for the cygwin environment. That's fine if that's what you want, but if you want to compile for Windows, you'll want mingw instead, as Gabe said. MingW is a Windows port of GCC which can compile to Windows.
thomasrutter
It still provides a gcc that can be used on windows with NetBeans; the overhead of adding cygwin.dll to any distribution is a separate issue.
Steve Gilham
+6  A: 

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.


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...

Pascal MARTIN
In English: "Description: The GNU C++ compiler. This is the GNU C++ compiler, a fairly portable optimizing compiler for C++." Which is pretty much how I would have translated it. :)
Meredith L. Patterson
@Meredith : Thanks!
Pascal MARTIN
Just for the record: if you want the english messages just execute "LANG=en apt-cache show g++". Should work with pretty much all commands.
Joachim Sauer
@Joachim : good to know! Thanks! (Didn't even know the english localization files were installed ^^ Well, I suppose they are by default ^^ )
Pascal MARTIN
+2  A: 

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

Jonas Byström
`sudo apt-get install g++`
Jørgen Fogh
Thanks for pointing it out!
Jonas Byström
+9  A: 

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

sudo apt-get install build-essential
Paul Dixon
A: 

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

ARV