来源.c ::
int source=0;
int desti=0;
char str[50]="";
来源.h::
extern int source;
extern int desti;
extern char str[50];
站1.c
#include"source.h"
#include<stdio.h>
main()
{
printf("%d %d",source,desti);
}
当我编译 station1.c 时,出现以下错误:
undefined reference to 'desti'
undefined reference to 'source'
谁能告诉我哪里出错了?