简体   繁体   English

如何在Windows上构建GCC 4.7?

[英]How to build GCC 4.7 on Windows?

如何在Windows上构建GCC 4.7?

You are not finding instructions on how to do this because you cannot natively use gcc in Windows. 您找不到有关如何执行此操作的说明,因为您无法在Windows中本机使用gcc Your options are either to use gcc through Cygwin [ installation instructions ] or install the MinGW port [ installation instructions ]. 您可以选择使用gcc通过Cygwin [ 安装说明 ]或安装MinGW端口[ 安装说明 ]。

You can also find links to these projects on the Installing GCC: Binaries page. 您也可以在“ 安装GCC:二进制文件”页面上找到这些项目的链接。

Well, gcc 4.7 has not yet been released (it will be released in a few months, ie spring 2012). 好吧, gcc 4.7 尚未发布 (它将在几个月内发布,即2012年春季)。

If your system is Windows then I am sorry for you, Linux is so much better :-) More seriously, you should search for cygwin gcc . 如果您的系统是Windows,那么我很抱歉,Linux更好:-)更严重的是,您应该搜索cygwin gcc I cannot help you in that case. 在那种情况下我无法帮助你。

What did you try? 你尝试了什么? Building GCC (even on Linux) is not an easy task. 构建GCC(即使在Linux上)也不是一件容易的事。 Some hints (which I guess are also relevant to cygwin & windows). 一些提示(我想也与cygwin和Windows有关)。

  1. Always configure and build the compiler in a build tree outside of the source tree . 始终在源树之外的构建树中配置和构建编译器。 (this is a common mistake). (这是一个常见的错误)。

  2. take care of the many dependencies (and their versions ), like the Parma Polyhedra Library, Cloog, etc ... 处理许多依赖项 (及其版本 ),如Parma Polyhedra Library,Cloog等...

  3. some features of GCC are not available on Windows. GCC的某些功能在Windows上不可用。 In particular plugins. 特别是插件。

I would suppose that installing the binary of an older variant of cygwin gcc (and all the related packages) will help. 我认为安装cygwin gcc(以及所有相关软件包)的旧版本的二进制文件会有所帮助。

But really, I know nothing about Windows. 但实际上,我对Windows一无所知。 And if you really want a very recent GCC and you cannot install Linux (or build GCC cygwin), you might perhaps consider running Linux in an emulator or virtual machine. 而且,如果您真的想要一个最新的GCC,并且无法安装Linux(或构建GCC cygwin),则可以考虑在仿真器或虚拟机中运行Linux。

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

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