mkclawhammer 写了:I'm curious about why you prefer use so complicated method to develop c/c++ project. Using powerful IDE such as Eclipse or NetBeans, one could spend zero cost on begining java, c/c++ development. These IDEs are platform independent, and you don't need spend more than 10 minutes on learning them!
You seem like trying to make a text editor + its plugins acting as a IDE. I think you should let the professional tool do a professional thing. You should not fear to learn new things.
professional tool do a professional thing! Eamcs 是编辑器, gcc 是编译器, debug 来查错, make 来做工程控制, 等等.
如果把它们粘起来, 可以很好的处理程序. 这是 professional tool do a professional thing. 但是, 把 emacs 打扮成一个 ide, 那么它一定没有专门的 ide 方便和有效. 像 lz 这样, 写 c 是一堆插件, 如果写 java, python ...呢? 又是一堆插件, 这样 emacs 永远是一个二流的 ide. 难道我们的目标是把 vim/emacs 变成二流的 ide 吗!
Unix philosophy ------------McIlroy: A Quarter Century of Unix
This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.
让别人体会到 unix 下工具的统一与合作才是重要的. 可惜我现在做不到, 只是像
viewtopic.php?t=45814&highlight=
中说的一样
1. 输入源代码
$ emacs hello.c >>>> 进入emacs 编辑器环境
#include <stdio.h>
int main()
{
printf(“Hello World. ”); >>>> Emacs环境下,按下 Tab 键,有自动缩进功能
exit(0);
}
完成输入后,按住CTRL 键,按下 x, 再按下 c , 最后松开 CTRL。 >>>> 程序保留并退出emacs 环境。
2. 编译,链接,运行
引用
$ gcc -o hello hello.c
$ ./hello >>>> ./ 指明了所执行程序的路径
Hello World.
$
一个linux平台上的c程序开发已经完成咯
3. 调试
如果要使用 gdb 调试程序,那么在上一步编译的时候,记得加上 -g 选项
引用
$ gcc -g -o hello hello.c
$ gdb hello >>>> 进入 gdb 调试环境