This is pretty OT for this list. It's a plain "C" language issue.
You are creating two instances of type , all named
.
One is instanciated and initialized as you expect in
static_function_ptr_def.c. But this instance is , so it cannot
be used from another module (i.e. from static_function_ptr.
Hello,
I am having a problem with a C program. It appears that static variables
are not being initialized when in an object file. The program compiles and
links fine but funcPtrStruct.ptr is null so program crashes.
This program works using gcc on Linux and (as I understand the C language)
sho
Alan Cooley wrote:
Hello,
I am having a problem with a C program. It appears that static variables
are not being initialized when in an object file. The program compiles and
links fine but funcPtrStruct.ptr is null so program crashes.
This program works using gcc on Linux and (as I understan
3 matches
Mail list logo