Sign in to follow this  
Daniel Protopopov

Boost & Visual C++ 2005 (Express)

Recommended Posts

Hi guys, I'm having problems building and using Boost in my project while using Visual Studio Express. Here, http://www.boost.org/tools/build/v1/vc-8_0-tools.html, it says I need to define _SCL_SECURE_NO_DEPRECATE somewhere in Boost (globally it says). But which file exactly that has to be done? I overcame this problem by compiling it with BJAM with option "-s _SCL_SECURE_NO_DEPRECATE=1", but now there are warnings about the /Og (global optimisation), and I don't know WHERE to define /remove it from. If anyone has a clue, please post it here. Thank you.

Share this post


Link to post
Share on other sites
CTar    1134
Do you get warnings when compiling Boost or when using Boost? If you are just compiling Boost to use it and the warnings you get are when you compile Boost then just ignore them.
If you get warnings when compiling your own project you should do something like this:

// Check for _MSC_VER to ensure we use MSVC
#ifdef _MSC_VER
// Make sure the code following this won't have the warnings disabled.
#pragma warning(push)
// Disable warning 5356, 5631 and 3534. Change the number to disable other warnings.
// We only want to disable them while we include Boost.
#pragma warning( disable : 5363 5631 3534)
#endif

#include <boost/someheader.hpp>
#include <boost/someheader2.hpp>

#ifdef _MSC_VER
// Restore the original warning settings
#pragma warning(pop)
#endif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this