I have just downloaded Boost 1.35.0 for use with MSVC9 (Microsoft Visual Studio 9.0). As some of you may be aware, Microsoft has added some features which are a little troublesome to work around with Boost. They are controlled by the following macros (and perhaps others I've missed):

 - _CRT_SECURE_NO_WARNINGS

 - _SCL_SECURE_NO_WARNINGS

 - _SECURE_SCL

 

I must say, I find building Boost a pain at the best of times, but I can't seem to find a way to define these macros on bjam's command line. Putting the changes in "boost/config/user.hpp" doesn't work and errors like the following result:

 

basic_iserializer.cpp

.\boost/config/user.hpp(128) : warning C4005: '_SECURE_SCL' : macro redefinition

        C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\yvals.h(124) : see previous definition of '_SECURE_SCL'

 

The reason is in this instance is that "basic_iserializer.cpp" contains the following at the top:

#include <cassert>

#include <cstdlib> // NULL

#include <boost/config.hpp>

 

Note that <cassert> is included before <boost/config.hpp>: it's already too late then as including <cassert> results in the macros being defined.

 

I have searched the web and found many "solutions", but I couldn't get any of them to work. Any help would be much appreciated.

 

Steve