摘要:
1.gcc包含的c/c++编译器gcc,cc,c++,g++,gcc和cc是一样的,c++和g++是一样的。一般c程序就用gcc编译,c++程序就用g++编译。2.gcc的基本用法gcc test.c这样将编译出一个名为a.out的程序gcc test.c -o test这样将编译出一个名为test的程序,-o参数用来指定生成程序的名字 3.为什么会出现undefined reference to...
阅读全文
posted @ 2008-05-07 17:06
konyel
阅读(1276)
推荐(0)
编辑
摘要:
Makefile的编写假设我们有下面这样的一个程序,源代码如下:/* main.c */#include "mytool1.h"#include "mytool2.h"int main(int argc,char **argv){mytool1_print("hello");mytool2_print("hello");}/* mytool1.h */#ifndef _MYTOOL_1_H#def...
阅读全文
posted @ 2008-05-07 16:28
konyel
阅读(451)
推荐(0)
编辑