Hi,all
My problem is :
in my project i am using several files and a static library , totally written in ansi c.
1,file a.c is a file do the upper side operation, it will call some functions in b.lib, there is a strut like this in a.c.
typedef struct {
unsigned char *name;
int (*function1)(void *p);
int (*function2)(xxxxx);
} strA;
in the init time of upper operation, the function pointer will be set . They will link to the real function in the b.lib.
(say,like the following)
strA sp;
sp.function1 = &functionAInFile1;
2, in b.lib, there are several c files every of which does the same job but in different ways. (say , they are File1.c; File2.c; File3.c ...)
in every c file, there are some functions that for the function pointers to link to.
When I debug, the a.c can successfully call the function in the File1.c or others. but, when it runs into the real function, I find the system can not recognize the local struct in the File1.c or others c files.
just like that
/* 1.c details */
#including <stdio.h>
...
typedef struct {
xxxxx
xxxxx
} structLocalInFile1;
/* one function */
int functionAInFile1(void *p)
{
StructLocalIn1 *localP = (StructLocalIn1 *)p;
.....
return 0;
}
/* another function */
int functionBInFile1() {
int a;
...
return 0;
}
in the immediate window of VC6, when it runs into the functionAInFile1,
I find the compiler can not recognize the StructLocalIn1 struct.
I don't know why.
Any commend is welcome.
Thanks in advance.
Wu7up