We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
i write a global.h file: #ifndef GLOBAL_H #define GLOBAL_H int nGlobal; #endif //file A.c #include "global.h" .... //file B.c #include "global.h" .... Build target 'Target 1' compiling A.c... compiling B.c... linking... *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: nGLOBAL MODULE: A.obj *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: nGLOBAL MODULE: B.obj oh,why the error do not happen when i write code "#include <reg51.h>" in several .c files. please help me,thank you very much.
thank you vrey much. I think you are right. but that is very surprising that no errors with using <reg51.h>. so i think "sfr" and "sbit" do not realy define a variable.