#ifndef _HEAD_H_
#define _HEAD_H_
void test1();
void test2();
void test3();
#endif
#include<stdio.h>
void test1()
{
printf("test1\n");
}
#include<stdio.h>
void test1()
{
printf("test2\n");
}
#include<stdio.h>
void test1()
{
printf("test3\n");
}
#include <stdio.h>
#include "head.h"
void main()
{
test1();
test2();
test3();
}
编译步骤:
gcc -c test1.c test2.c test3.c main.c // 或者gcc -c *.c
gcc -o main *.o
./main