<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman">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):</font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>- _CRT_SECURE_NO_WARNINGS</font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>- _SCL_SECURE_NO_WARNINGS</font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>- _SECURE_SCL</font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="Times New Roman" size="3"> </font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman">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:</font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="Times New Roman" size="3"> </font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman">basic_iserializer.cpp</font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman">.\boost/config/user.hpp(128) : warning C4005: '_SECURE_SCL' : macro redefinition</font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\yvals.h(124) : see previous definition of '_SECURE_SCL'</font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="Times New Roman" size="3"> </font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman">The reason is in this instance is that "basic_iserializer.cpp" contains the following at the top:</font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman">#include <cassert></font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman">#include <cstdlib> // NULL</font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman">#include <boost/config.hpp></font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="Times New Roman" size="3"> </font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman">Note that <cassert> is included before <boost/config.hpp>: it's already too late then as including <cassert> results in the macros being defined.</font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="Times New Roman" size="3"> </font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Times New Roman">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.</font></font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="Times New Roman" size="3"> </font></p> <p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="Times New Roman" size="3">Steve</font></p>