简体   繁体   English

在哪里下载GNU C ++编译器

[英]Where to download GNU C++ compiler

谁能建议我在哪里下载GNU c ++编译器,我可以在Ubuntu中使用它,也可以在Windows上使用Netbeans IDE以及GNU工具。

在Debian / Ubuntu上获得所需的一切非常容易:

sudo apt-get install build-essential 

What about using GCC ? 使用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,...). GNU编译器集合包括C,C ++,Objective-C,Fortran,Java和Ada的前端,以及这些语言的库(libstdc ++,libgcj等)。

It will definitly work on Ubuntu ; 它将最终在Ubuntu上运行; it's even provided through the package system (sorry, my system is in french) : 它甚至是通过package系统提供的(对不起,我的系统是法语)

$ 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) (翻译成Description:GNU C ++编译器。这是GNU C ++编译器,是一种相当轻巧的C ++优化编译器。用英语)

For informations about Windows support, you can have a look at : http://gcc.gnu.org/install/specific.html#windows 有关Windows支持的信息,您可以查看: http : //gcc.gnu.org/install/specific.html#windows

Something like MinGW or Cygwin will probably do :-) MinGWCygwin之类的东西可能会做:-)

Quoting MinGW's homepage : 引用MinGW的主页:

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. MinGW是“用于Windows的极简主义GNU”的缩写,是GNU编译器集合(GCC)和GNU Binutils的端口,用于开发本机Microsoft Windows应用程序。


For netbeans, I can't tell : I don't use it -- not for C++, at least... 对于netbeans,我不知道:我不使用它-至少对于C ++来说不是。

对于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. 如果您使用的是任何Linux / Unix / Solaris OS,则除非明确未安装,否则它将可用。 That said, if you still wish to install GNU C++ compiler, use this command 也就是说,如果您仍然希望安装GNU C ++编译器,请使用此命令

sudo aptitude install build-essential 

and if you wish to download it on your windows, steps are here on Minimalist GNU for Windows 如果你想下载你的窗口,步骤是这里的极简主义GNU为Windows

To install the gcc and g++ compilers, you will need the build-essential package. 要安装gcc和g ++编译器,您将需要build-essential软件包。 This will also install GNU make. 这也将安装GNU make。

build-essential contains a list of packages which are essential for building Ubuntu packages including gcc compiler, make and other required tools. build-essential包含软件包列表,这些软件包对于构建Ubuntu软件包至关重要,包括gcc编译器,make和其他必需的工具。

$ 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. 现在,您应该能够使用C / C ++编译器来编译软件。

To install the manpages for c and c++ development, install the manpages-dev package. 要安装用于c和c ++开发的手册页,请安装manpages-dev软件包。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM