完整的编译通过的。
main.c
#include "ram.h"
uchar aaa;
main()
{ a();
b();
}
a.c
#include "ram.h"
void a()
{
aaa=1;
}
b.c
#include
#include
#include "ram.h"
void b()
{
printf("%d",aaa);
}
ram.h
#ifndef __RAM_H__
#define __RAM_H__
#define uchar unsigned char
#define uint unsigned int
extern uchar aaa;
void a();
void b();
#endif