eclipse - 内部生成器 : Cannot run program "g++": The system cannot find the file specified

标签 eclipse cygwin eclipse-cdt

****** Internal Builder is used for build               ******
g++ -ot1.o ..\t1.cpp
Internal Builder: Cannot run program "g++": The system cannot find the file specified.

Build error occurred, build is stopped

我是 eclipse 新手,在 Windows XP 上,想要运行 c/c++ progms + linux 构建(cygwin 已安装所需的软件包)
上面说的错误即将到来并且构建失败!请大家多多指教。

编辑:附加到路径环境变量 e:\cygwin\bin;

此供引用:

alt text

最佳答案

你怎么样setup your Cygwin toolchain in your Eclipse CDT
(摘自 Alex WuAlex's Tech Blog 中的优秀博客文章)

1/ Install the Cygwin properly, you need following packages:

binutils
gcc
gcc-core
gcc-g++
gcc-mingw-core
gcc-mingw-g++
make
gdb (needed if you want to support debug in eclipse)

you can check your cygwin installation using the 'cygcheck -c' command

alt text

2/ Add %cygwin%\bin to your env PATH, then open the eclipse. you will find the cygwin tool chain will be shown when you open a new c/cpp project wizard.

alt text

3/配置GDB。

转至Windows->首选项->C/C++ -> 调试 -> 通用源代码查找
添加以下“路径映射”:

\cygdrive\c -> c:\
\cygdrive\d -> d:\ 
other drives if any .......

alt text

关于eclipse - 内部生成器 : Cannot run program "g++": The system cannot find the file specified,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2606740/

相关文章:

eclipse - 如何在 ubuntu 上卸载 eclipse neon?

copy - 如何使用 cp 和/或 find 递归地将 src 中的所有 *.foo 文件复制到目标?

bash - 如何设置我的 Cygwin PATH 以查找 postgresql header 和库路径?

linux - 在bash中处理二进制数据文件,查找大于某个数字的元素

c - 为什么在Eclipse中的printf之前执行scanf?

java - jsp 中的警告 : The tag handler class for "s:form" (org. apache.struts2.views.jsp.ui.FormTag) 在 Java 构建路径上找不到

php - 我怎样才能让 PHP 魔法常量 __FILE__ 与 Eclipse 和 PDT 一起工作

c++ - Eclipse CDT:无法添加语言设置提供程序

c++ - Boost 和 OpenCV 库与 Eclipse CDR 的静态链接。错误

c++ - 如果我使用日志记录库,SDL 不会显示其窗口