1:在终端启动EMACS.
2:按C-x C-f, 键入文件名,
如:hello.c
3:hello.c 源代码:
#include <stdio.h>
int main(void)
{
printf("hello !\n");
return 0;
}
|
4:键入M-x compile RET(回车), 此时会出现make -k, 按Backspace, 删除make -k, 键入:
gcc hello.c -o hello RET
5:此时EMACS会开启一WINDOW, 显示: Compilation finished at Fri Aug 22 11:05:15, 呵呵, 恭喜, 编译成功.
6: 下面你可以在终端或在EMACS下运行./hello了.
阅读(5116) | 评论(0) | 转发(0) |