c++ - 在eclipse中设置C++开发需要做什么?

标签 c++ eclipse eclipse-cdt

我目前正在尝试设置我的 eclipse,以便我可以在我的 Windows 计算机上开始 C++ 开发。但是,我遇到了一些错误。但首先,这是我目前所做的:

  • 为 Eclipse 安装了 CDT
  • 安装了 Cygwin(带有附加包 gccgccmake)
  • 在 Eclipse 中添加了所有“标题路径”

问题是当我尝试运行我的 Hello World 程序时,我得到 Launch failed。找不到二进制文件。

我已经构建并重建了项目,但程序仍未运行。一定是因为我有这些错误:

  • /bin/sh: g++: command not found
  • make: ***[src/HelloWorld.o] 错误 127

我该怎么做才能解决这些错误?

最佳答案

尝试再次运行 Cygwin setup.exe 并选择 g++ 的包。搜索它并确保已安装它们。它应该在名称 gcc-g++ 下。 C++ 编译器与 C 编译器分开安装。

关于c++ - 在eclipse中设置C++开发需要做什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19007693/

相关文章:

c++ - 当我直接解析 Mat 时,未检测到 OpenCv Aruco 标记

eclipse - java.lang.NoSuchFieldError : ROOT at org. apache.tomcat.util.res.StringManager

c - 带有 MinGW 的 Eclipse 没有正确链接

c++ - 即使在链接后也将 "Undefined Reference" boost 到系统

c++ - 一次播放多个声音并从我们离开的地方继续

c++ - 在 C/C++ 中使用 popen() 是一种糟糕的编码习惯吗?

c++ - 如何在 CMakeLists.txt 中包含 h/hpp 头文件而不是 cpp 或其他 hpp 文件

eclipse NEON "Could not create the JVM"

eclipse 光子屏幕渲染问题

c++ - 二进制永远不会构建