make:g ++:找不到命令

m4l*_*90n 13 c++ eclipse windows cygwin g++

我检查了类似的帖子,任何人都解决了我的问题.我很简单,但我是eclipse的新手.我想做一个简单的例子,我遇到了这个问题.

make文件就是这个

all: hello.exe

clean:
    rm Hello.o Hello.exe

hello.exe: hello.o
    g++ -g -o hello.exe hello.o

hello.o:
    g++ -c -g main.cpp
Run Code Online (Sandbox Code Playgroud)

我收到此错误"make:g ++:Command not found"

谢谢你的帮助.

Gre*_*ley 10

sudo apt install g++在 Ubuntu 20 LTS 上成功了。


hd1*_*hd1 7

您需要从GNU安装开发工具.我假设你在Windows上,在这种情况下你有两个选择:cygwinmingw.前者包括开箱即用的g ++.我对mingw不熟悉,但C++标准库似乎也可用.

请参阅这些安装说明,如果可能的话,我建议从步骤1开始.