C++ 如何使用新的 Visual Studio 2013 预览版构建提升?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17440810/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I build boost with new Visual Studio 2013 preview?
提问by Ivan Aksamentov - Drop
When trying to build Boost 1.54for Visual Studio 2013 Preview(MSVC12) it warns:
尝试为Visual Studio 2013 预览版(MSVC12)构建Boost 1.54 时,它警告:
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'
boost_1_54_0\boost/iterator/detail/facade_iterator_category.hpp(166):错误 C2039:'assert_not_arg':不是 'boost::mpl' 的成员
And looks like old libs from MSVC11 are not compatible.
看起来来自 MSVC11 的旧库不兼容。
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?
我真的很想测试新的 IDE/编译器版本并需要提升。那么,是否可以在新的 Visual Studio 2013 预览版中使用 boost?
回答by Ivan Aksamentov - Drop
Yes. It is possible.
是的。有可能的。
Possible solutions are:
可能的解决方案是:
- Try build Boost 1.53: not too fresh, but for some strange reason it builds just fine.
- If you really-reallyneed Boost 1.54 (new Log library looks good :) ), try to apply thisdiff-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.
- 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.
- 尝试构建Boost 1.53:不太新鲜,但由于某些奇怪的原因,它构建得很好。
- 如果您真的真的需要 Boost 1.54(新的 Log 库看起来不错 :)),请尝试将此差异补丁应用于您的 Boost 1.54 发行版。它最适合修订版 84920,但您也可以尝试任何其他版本。请注意,我不是此补丁的作者。
- 尝试使用Subversion获取最新版本:
svn co http://svn.boost.org/svn/boost/trunk boost-trunk
。在您阅读本文时,贡献者已经解决了问题。
EDIT: 26 aug 2013
编辑:2013 年 8 月 26 日
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!
看起来 boost 人们解决了这些问题。最新的 SVN 修订版svn co http://svn.boost.org/svn/boost/trunk boost-trunk
构建良好。感谢他们!
EDIT: 4 dec 2013
编辑:2013 年 12 月 4 日
Quote from TheArtTrooper comment:
引自 TheArtTrooper 评论:
Boost 1.55.0 builds with the Visual Studio 2013 RTM without any additional patches
Boost 1.55.0 使用 Visual Studio 2013 RTM 构建,无需任何额外补丁
Happy boosting!
快乐提升!
回答by TheArtTrooper
If you use the auto-linking boost feature, you'll also need to patch boost/config/auto_link.hpp. I changed the file to:
如果您使用自动链接 boost 功能,您还需要修补 boost/config/auto_link.hpp。我将文件更改为:
// 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__)
回答by Robert Husák
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.
感谢Lars Viklund 提供的几个补丁,我能够构建 Boost 1.54(以及一个依赖它的项目)。在撰写本文时,前两个补丁已提交给 SVN - 修订版 85177。
回答by watbywbarif
I had this issue with Visual Studio 2013 Update 4 and Boost 1.54, update to Boost 1.57 fixed it.
我在 Visual Studio 2013 Update 4 和 Boost 1.54 中遇到了这个问题,更新到 Boost 1.57 修复了它。