This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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) should work anywhere. Thanks in advance for any explanation/corrections you can provide. Alan. ---------------- Files attached: gccversion.txt - output of "gcc -v" Makefile - 'nuf said static_function_ptr_def.h - header for structure to hold function ptr static_function_ptr_def.c - implementation with static initializer static_function_ptr.c - main that invokes the function
Attachment:
gccversion.txt
Description: Text document
Attachment:
Makefile
Description: Binary data
Attachment:
static_function_ptr_def.h
Description: Binary data
Attachment:
static_function_ptr_def.c
Description: Binary data
Attachment:
static_function_ptr.c
Description: Binary data
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |