在路径中找不到程序 g++

2022-01-23 00:00:00 c g++ eclipse

我将 Eclipse 用于 C 项目.我通过转到 New->C project->Executable->Empty Project, Linux gcc toolchain 创建了一个新项目.

I am using Eclipse for a C project. I created a new Project by going to New->C project->Executable->Empty Project, Linux gcc toolchain.

当我添加一个新的 .c 文件时,我得到在路径中找不到程序 'g++'".我该如何摆脱这个?我什至没有使用 C++.

When I add a new .c file, I get "program 'g++' not found in path". How do I get rid of this? I'm not even using C++.

推荐答案

我也遇到过类似的问题,已经解决了

I had similar problem and it is solved by

  1. 使用 ubuntu 软件中心安装 g++ GNU C++ 编译器和

  1. Installing g++ The GNU C++ complier using ubuntu software centre and

换衣服-

Window -> Preferences -> C/C++ -> Build -> Settings -> Discovery -> CDT GCC Build in Complier Settings [Shared]

Window -> Preferences -> C/C++ -> Build -> Settings -> Discovery -> CDT GCC Build in Complier Settings [Shared]

From: ${COMMAND} -E -P -v -dD "${INPUTS}"
To  : /usr/bin/${COMMAND} -E -P -v -dD "${INPUTS}"

希望对你有帮助.

相关文章