|
1. if you "#define SIZE 5" in header.h, and if you #include "header.h" in your .c file, the the .c file should have SIZE.
For troubleshooting, the "#error" directive is your friend.
Make sure your "-I" (include header) compile switches are set correctly (you might even need "-I." to include headers in the current directory. Make sure there are no "#ifdef's" that are "filtering out" your #define.
And finally, edit "header.h" and put "#error SOME MESSAGE" right after "#define SIZE". Recompile your C program. It should die at the "#error" line. Adjust your "-I" compile switch, and move the #error around in your .h file, until it does die. At that point: voila! You've found the problem.
2. With regard to your oid initialization question: please declare the oid array[] "extern" in the header, then define it (and initialize the data) in one or another C/C++ file.
'Hope that helps .. PSM
|