我在一个文件中有一个结构 abc
struct abc {
some variaables
and functions
}
我在其他文件中使用这个结构如下:
struct abc *t = kmalloc(sizeof(struct abc));
kmalloc 相当于 malloc
然后出现以下错误:
expected '=', ',', ';', 'asm' or '__attribute__' before 'struct'
error: variable 't' has initializer but incomplete type
warning: implicit declaration of function 'kmalloc'
invalid application of 'sizeof' to incomplete type 'struct trapframe'
storage size of 't' isn't known
我哪里错了?