Windows下用Eclipse搭建C/C++开发环境(二)
p;<< input << " you need to enter m to exit." << endl; } exit(0); }
- all: hello.exe
- clean:
- rm main.o hello.exe
- hello.exe: main.o
- g++ -g -o hello main.o
- main.o:
- g++ -c -g main.cpp
注意,makefile里的行首缩进用的是Tab而不是空格。如果编译时提示 No separator...就是这里有问题。
10. 重新build, 大功告成。