gcc 编译和链接

1、现在对两个文件生成可执行文件

//thanks.c
#include <stdio.h>
int main(void)

{
    printf("Hello World\n");

    thanks_2();
}
View Code
//thanks_2.c
#include <stdio.h>

int thanks_2(void)

{
    printf("Hello World2\n");
    return (1);
}
View Code

2、步骤

一、cd 到文件所在目录

二、gcc -c 编译

三、gcc -o 链接

四、./xx  执行

备注:相关cygwin的使用说明,http://www.cnblogs.com/mlj318/archive/2011/09/07/2182351.html

posted @ 2015-02-02 20:57  lwn6  阅读(192)  评论(0编辑  收藏  举报
什么是幸福?天天在做自己想做的事情,家人、同事、朋友、客户、网友都和和睦睦,身体健康、钱包鼓鼓、女朋友天天开心、生活无忧无虑就是最大的幸福