摘要: 节选自http://wiki.ubuntu.org.cn/GcchowtoC 语言经典的入门例子是Hello World,下面是一示例代码:#include <stdio.h>int main(void){ printf("Hello, world!\n"); return 0;}我们假定该代码存为文件‘hello.c’。要用gcc编译该文件,使用下面的命令:$ gcc -g -Wall hello.c -o hello该命令将文件‘hello.c’中的代码编译为机器码并存储在可执行文件 ‘hello’中。机器码的文件名是通过-o选项指定的。该选项通常作为命令行 阅读全文
posted @ 2011-09-12 13:47 icwzhang 阅读(576) 评论(0) 推荐(0) 编辑