#define SYSYEM LINUX #if SYSTEM == LINUX #define HDR "linux.h" #elif SYSTEM == WINDOWS #define HDR "windows.h" #elif SYSTEM == C51 #define HDR "c51.h" #else #define HDR "default.h" #endif #include HDR I would expect this to work, but I just keep getting "warning C322: unknown identifier" errors. whats wrong?
Hm. Yes, I think Hans is right. When I ran into this same problem a while back, the symptom was that the compiler always took the first #if branch, rather than give me a compiler error. Thanks for the correction. I don't like cigars anyway :)