This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Access Struct variable from

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];

In Config.H is the declaration:
extern struct StructUserRec UserRec[10];

How can I access this structure from Routines.C? I know how to do this with other variables. But it doesn't work.

My compiler gives an error like:
ROUTINES.C(75): error C230: 'StructUserRec': unknown struct/union/enum tag

How can you make structures accessible from different .C files?

Thanks in advance,

M. Joosse

0