Hi I've split my project in 2 parts while each part is implemented by one. So some includes like <reg51.h> is done twice which resulted in error. So in order to avoid this I did as follows: #if !defined(REG51_h__INCLUDED_) #define REG51_h__INCLUDED_ #endif but it seems that this doesn't result in: #include <reg51.h> if it has not been included before. How should I solve it?!! I appreciate your attention in advance!!
This is what I do: create a my_reg51.h #ifndef MY_REG51_H #define MY_REG51_H #include <reg51.h> #endif In your source, you #include <my_reg51.h> This way, you don't need to modify reg51.h Anh