main.cで宣言したextをsub.cから参照したいのですが、
どこが間違ってるのでしょうか・・。

------main.c------
#include <stdio.h>
struct ext_tbl {
 int a;
};
struct ext_tbl ext;
main() {
 ext.a = 1;
 sub();
}
------sub.c------
#include <stdio.h>
extern struct ext_tbl ext;
sub() {
 printf("ext.a=%d\n", ext.a);
}
------コンパイル結果------
bash-3.1$ cc -c e1.c
bash-3.1$ cc -c e2.c
e2.c: In function ‘sub’:
e2.c:4: error: invalid use of undefined type ‘struct ext_tbl’
bash-3.1$