make: g++: Command not found

雨燕双飞 提交于 2021-02-04 16:56:22

问题


I've checked similar posts and anyone solve my problem. I's very simple but I'm new with eclipse. I'm trying to make a simple example and I'm having this problem.

the make file is just this

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

And I get this error "make: g++: Command not found"

Thanks for helping.


回答1:


You need to install the development tools from GNU. I assume you're on windows, in which case you have two options: cygwin and mingw. The former includes g++ out of the box. I'm less familiar with mingw, but the C++ Standard library appears to, also, be available.

See these installation instructions, I'd recommend starting from step 1, if at all possible.



来源:https://stackoverflow.com/questions/13887225/make-g-command-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!