求救:UNIX下第一次编程,报错!
Hello.cpp原文件如下:
#include <iostream.h>
int main()
{
int* iPtr;
int iCount = 18;
iPtr = &iCount;
cout < <*iPtr < <endl;
}
makefile文件内容:
Hello.exe:Hello.cpp
aCC -o Hello Hello.cpp
clean:
rm *.o
rm Hello
make 生成了Hello执行文件,chmod 755 Hello
运行却报错:
[225] % Hello
Hello: Command not found.
------解决方案--------------------try it to write Makefile
Hello: Hello.cpp
<TAB> aCC -o Hello Hello.cpp
clean:
<TAB> rm *.o
<TAB> rm Hello