I have a couple of global arrays that I want to be accessible in a few source files, but I cant get it to work. First I tried using a shared header:
Which seems to work for my #defines and struct definitions, but if I put the arrays in there gcc moans about multiple definitions.Code:#ifndef HEADER_SEEN #define HEADER_SEEN //In here #endif
If I put the code in main then the other source files cant see it. I dont know if this makes a difference but I am assigning values to the arrays as I declare them.
How can I fix this?