HEllo,
i get an constant error message in my actual c-code. Because i am like a beginner in coding i wouldnt be suprised if i am doing something awefully wrong, so i am sure someone can easily help me:
The basic trouble is i have some unresolved symbols in my error replies:
unresolved symbol Temp_Array, first referenced in ./StatusAnzeige/StatusAnzeige.obj
What i do is the following: i have of course a main.c in there i have few defines:
#define TEMP_NREGS 150
and some global static declarations:
static USHORT Temp_Array[TEMP_NREGS];
Now i am working in another fule calles StatusAnzeige.c ( including the header of this file in my main.c of course)
extern USHORT Temp_Array[TEMP_NREGS];
FIRST QUESTION: In this other file i cannot use the TEMP_NREGS define from my main-routine, but i would really like to use it, am i doing something wrong in my c-usage, i only can include part headers form other files into my main, but in my main of course there is no main header files with declarations i could use in my other code files???
As i am new to C, I dont know i simply dont see a solution, or if it is really the c-programming style which supresses my inner creativity of how i would like to use the language :) This often happens also when i am talking, language simply doesnt fit me :)
But enough of that, the next thing with the unresolved symbol is more important, as i cannot use my Temp_Array in other files as the main.c.
Another thing is, that when i am not even declaring this array as extern, i get other error messages, so i think the extern usage is kind of right, but something must be missing, so my compiler or the whole c -code tells me i am not allow to use the external defines Array in any other but my source file main.c
I am kind of confused and dont know any other answer but asking for Your help.
So thanks a lot in advance.
Best wishes.
Seb