23

When trying to build Boost 1.54 for Visual Studio 2013 Preview (MSVC12) it warns:

Unknown compiler version - please run the configure tests and report the results

and then fails with error:

boost_1_54_0\boost/iterator/detail/facade_iterator_category.hpp(166) : error C2039: 'assert_not_arg' : is not a member of 'boost::mpl'

And looks like old libs from MSVC11 are not compatible.

I really-really want to test new IDE/Compiler version and need boost. So, is it possible to use boost with new Visual Studio 2013 Preview?

Ivan Aksamentov - Drop
  • 12,860
  • 3
  • 34
  • 61

4 Answers4

24

Yes. It is possible.

Possible solutions are:

  1. Try build Boost 1.53: not too fresh, but for some strange reason it builds just fine.
  2. If you really-really need Boost 1.54 (new Log library looks good :) ), try to apply this diff-patch to your Boost 1.54 distributive. It is best suited for revision 84920, but you can try any other too. Note that I am not author of this patch.
  3. Try to get latest revision with Subversion: svn co http://svn.boost.org/svn/boost/trunk boost-trunk. For a time when you reading this, issue can be already fixed by contributors.

EDIT: 26 aug 2013

Looks like boost folks fixed these issues. Latest SVN revision svn co http://svn.boost.org/svn/boost/trunk boost-trunk builds fine. Thanks to them!

EDIT: 4 dec 2013

Quote from TheArtTrooper comment:

Boost 1.55.0 builds with the Visual Studio 2013 RTM without any additional patches

Happy boosting!

Ivan Aksamentov - Drop
  • 12,860
  • 3
  • 34
  • 61
  • Could you please explain why the following is needed in the patch: `#if _MSC_VER < 1800 && (_MSC_FULL_VER < 170051025 || !defined(BOOST_MSVC_ENABLE_2012_NOV_CTP))` – Igor R. Jul 03 '13 at 08:07
  • Here patch just adds check whether msvc version is lower than 1800 (Visual Studio 2013, aka "msvc12" ) and combines it with original checks. Original line checks if msvc not contains "update 3" or november's compiler update. If version checks fail, boost restricted to not use some C++11 features, that orevious msvc versions not supports. Note that I am not autor of this patch (I will add this to the answer) – Ivan Aksamentov - Drop Jul 03 '13 at 10:33
  • Ok I see. Actually, the original condition appears to be *stronger* than `_MSC_VER < 1800` addition, so it seems that patching this line was unnecessary. – Igor R. Jul 03 '13 at 11:36
  • Yeah, it's really redundant =) – Ivan Aksamentov - Drop Jul 03 '13 at 12:44
  • I've compiled the 1_55_0 release tar ball with a minor patch: http://stackoverflow.com/a/20815896/85371 – sehe Dec 28 '13 at 14:59
11

If you use the auto-linking boost feature, you'll also need to patch boost/config/auto_link.hpp. I changed the file to:

    // vc10:
#    define BOOST_LIB_TOOLSET "vc100"

#  elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800)

     // vc11:
#    define BOOST_LIB_TOOLSET "vc110"

#  elif defined(BOOST_MSVC)

     // vc12:
#    define BOOST_LIB_TOOLSET "vc120"

#  elif defined(__BORLANDC__)
TheArtTrooper
  • 1,105
  • 8
  • 19
4

I was able to build Boost 1.54 (and a project depending on it) thanks to several patches provided by Lars Viklund. At the time of the writing, the first two of the patches were committed to the SVN - revision 85177.

0

I had this issue with Visual Studio 2013 Update 4 and Boost 1.54, update to Boost 1.57 fixed it.

watbywbarif
  • 6,487
  • 8
  • 50
  • 64