Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Pre-defined Compiler Macros for OS

📅 2015-Oct-26 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cpp, macro, operating system, preprocessor ⬩ 📚 Archive

C or C++ code that needs to be ported across multiple operating systems will inevitably end up using pre-processor directives. These directives will look for the pre-defined macros defined by the compilers or OSes on which the code needs to be compiled or run.