for example on Linux you could compile using
g++ -D_LINUX file.cpp -o output # turns on the #define _LINUX
and on windows using
g++ -D_WIN32 file.cpp -o output #turns on #define _WIN32
So if you had a makefile on both systems, you could set your compiler flags to reflect the defines you need.
Last edited by stilllearning; Oct 2nd, 2008 at 8:26 pm.