Boost logo

Boost :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-04-09 07:50:02


Tobias Schwinger wrote:
> That's interesting... I tested the code before posting with gcc 3.4 and there were no problems.

You are correct. Great!

I did it slightly different and this was causing the error message,
because PLATFORM_HEADER_DIRECTORYheader was interpreted as token, which
of course can't work.

The wollowing DOES NOT WORK:

     #if defined(linux) || defined(__linux) || defined(__linux__)
     # define PLATFORM_HEADER_DIRECTORY <linux/
     #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
     # define PLATFORM_HEADER_DIRECTORY <windows/
     // [...]
     #endif

     // PLATFORM_HEADER_DIRECTORY must be separated by something that
     // causes header to be a separate token.
     #define PLATFORM_HEADER(header) PLATFORM_HEADER_DIRECTORYheader>

     #include PLATFORM_HEADER(foo.h)

Thank you again!
Roland


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk