70,014
社区成员




int a;
void show();
#define BUFSIZE 100
test1.c:
#include "test.h"
#include <stdio.h>
int fun()
{
printf("Hello World\n");
return 0;
}
void show()
{
}
test2.c:
#include<stdio.h>
#include "test.h"
#include "test.h" //注意我故意写了2行
int main(void)
{
//return 0;
//printf("%s", a);
}
也可以编译链接。
顿时崩溃!!!
用gcc试试,结果也如此,人生信念彻底毁灭。
#include "test.h"
#include <stdio.h>
int fun()
{
printf("Hello World\n");
return 0;
}
void show()
{
}
test2.c:
#include<stdio.h>
#include "test.h"
int main(void)
{
//return 0;
}
毫无压力,编译。链接都没错误,且无警告。
看到变量 int a没有!!!!
确实让我吃了一惊。