The symbol X shows up in the link map, but the linker still generates unresolved symbol errors for X in main. Any ideas?
File Main.c: extern xdata X[]; static char xdata* p = X; void main( void ) { }
File Sub.c: char xdata X[] _at_ 0x0012; static char xdata* p = X;
Since no array size is given in Sub.c the compiler doesn't provide space and may even assume that X is external (therefore it is never created). This should work without 'data different' warnings; File Main.c:
extern char xdata X; static char xdata* p = X; void main( void ) { }
char xdata X _at_ 0x0012; static char xdata* p = X;