
Tobias Schwinger wrote:
Where is the problem? [snip]
#include PLATFORM_HEADER(foo.h)
Should work. I've no idea how portable it is, though.
This exactly is the problem. This works with MS compilers, but not with gcc. It complains with: #include' expects "FILENAME" or <FILENAME>" However the following does work with gcc: #define PLATFORM_PFX <boost/whatever/windows/ #define PLATFORM_HDR foo.hpp #define PLATFORM_SFX > #include PLATFORM_PFX PLATFORM_HDR PLATFORM_SFX Unfortunately this wont work on MS compilers. My question was if it would be possible to get something that is compileable on a couple of platforms. I am aware that macro expansion after precompiler prefix seems to be implementation dependent. I am not even sure if the standard has to say anything about this. At least gcc seems not to conform to what is said in this (rather dated) document: http://www.lns.cornell.edu/public/COMP/info/egcs/cpp/cpp_1.html#SEC6 Roland