谁能建议我在哪里下载GNU c ++编译器,我可以在Ubuntu中使用它,也可以在Windows上使用Netbeans IDE以及GNU工具。
在Debian / Ubuntu上获得所需的一切非常容易:
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...
对于Windows,您将需要cygwin 。
在Ubuntu上使用sudo apt-get install g++
。
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
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.