Hello, My project contains several files: main.c routines.c config.h etc. In the main.c I make a structure like:
xdata struct StructUserRec{ BYTE XPIDNr[9]; char UserName[15]; BYTE ContrHour; BYTE ContrMin; BYTE WorkedHour; BYTE WorkedMin; }; xdata struct StructUserRec UserRec[10];
extern struct StructUserRec UserRec[10];
"If I wanted to have a successful compilation, I had to put the enum in the header file too" Well, of course you do! If you use any non-standard types, then you are obviously going to have to include the type definition with anything that relies upon that type! Why is this a problem to you? How else could it work?
"Why is this a problem to you?" Not anymore, Andy. I was confused at first since I had to move the struct into the header file. And of course, if a var is used in that struct that has a type defined in an enum, then that enum must be made public too! Otherwise, like you said, it can never work. -- Geert