如何设置Eclipse CDT来使用GCC-4代替GCC? [英] How to set Eclipse CDT to use GCC-4 instead of GCC?

查看:196
本文介绍了如何设置Eclipse CDT来使用GCC-4代替GCC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将Eclipse CDT设置为使用GCC-4而不是GCC?

How to set Eclipse CDT to use GCC-4 instead of GCC?

我问这个问题,因为我使用Windows 64位与Cygwin和gcc.exe不起作用我需要配置Eclipse CDT来使用gcc-4.exe。但我不知道如何设置它。

I'm asking this question, because i'm using windows 64 bits with Cygwin and gcc.exe does not work. I need to configure Eclipse CDT to use gcc-4.exe. But I don't know how to set it up. I cannot find where to change this setting.

谢谢。

推荐答案

我在OSX上使用Eclipse,而不是Windows,所以我无法解释如何为cygwin做到这一点,但是要将编译器更改为项目属性 - > c / c ++ Build-> settings-> gcc c ++编译器将命令选项从g ++更改为gcc-4.exe。您可能还需要更改c / c ++ Build-> Environment中的PATH环境变量,以及c / c ++ build-> Discovery Options中使用的编译器。

I'm using Eclipse on OSX, not Windows, so I cannot explain exactly how to do it for cygwin, but to change the compiler you go to the project properties->c/c++ Build->settings->gcc c++ compiler and change the "command" option from g++ to where-ever gcc-4.exe is. You may also need to change the PATH environment variable in c/c++ Build->Environment, and also the compiler used in c/c++ build->Discovery Options.

这篇关于如何设置Eclipse CDT来使用GCC-4代替GCC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆