以下三个文件编译时有个link错误
Linking...
st.obj : error LNK2001: unresolved external symbol "struct seqlist * __cdecl init_list(void)" (?init_list@@YAPAUseqlist@@XZ)
Debug/st.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
这是什么原因???
st.c文件
#include <stdio.h>
#include <malloc.h>
#include "stfun.h"
int main()
{
seqlist *L;
L=init_list();
return 0;
}
stfun.h文件
#define MAXSIZE 100
typedef struct
{
int data[MAXSIZE];
int last;
}seqlist;
seqlist *init_list();
stfun.c文件
seqlist *init_list()
{
seqlist *L;
L=(seqlist*)malloc(sizeof(seqlist));
L->last=-1;//*(L).last=-1
printf("seqlist initialized!");
return L;
}