I'm writing a portable C++ application. How do I include different headers based on the operating system its running on. Is there a way to do this in C++ or do i have to use the build system?
with preprocessor:
#ifdef _SUNOS
//code
#elseif _LINUX
//code
#elseif _HPUX
//code
#elseif _WIN32
//code
#else
#error OS not supported
#endif