gpt4 book ai didi

visual-studio-2010 - 无法构建-将VC++代码从VS2010迁移到VS2013

转载 作者:行者123 更新时间:2023-12-02 10:48:24 25 4
gpt4 key购买 nike

我正在尝试将我的源代码从VS2010迁移到VS2013。它使我无法休眠。我收到以下附件的编译错误。请帮助我确定我错过了哪个编译开关。我已经保存了VS2013中的.sln文件,以使其适应新环境。

我当前的编译设置如下:PlatformToolset: Visual Studio 2013 - Windows XP (v120_xp)
Command Line:
/Yu"stdafx.h" /FR"DebugU\" /GS /TP /analyze- /W3 /Zc:wchar_t /I"..\Common" /Zi /Gm- /Od /Fd".\DebugU/" /fp:precise /D "_PUGIXML" /D "_DEBUG" /D "_USRDLL" /D "_CRT_SECURE_NO_WARNINGS" /D "_BIND_TO_CURRENT_VCLIBS_VERSION" /D "_VC80_UPGRADE=0x0700" /D "_USING_V110_SDK71_" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX /Zc:forScope /RTC1 /Gd /Oy- /showIncludes /MTd /Fa".\DebugU/" /EHsc /nologo /Fo".\DebugU/" /Fp".\DebugU/xxxxxxxx.pch"

带有“ShowIncludes”的编译日志1> pugixml.cpp
1> Note: including file: d:\vistasonicpoc\common\pugixml.hpp
1> Note: including file: d:\vistasonicpoc\common\pugiconfig.hpp
1> Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\exception
1> Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef
1> Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\cstddef
1> Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\yvals.h
1> Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xkeycheck.h
1> Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\crtdefs.h
1> Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\use_ansi.h
1> Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\initializer_list
1> Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtr1common
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtr1common(421): error C2159: more than one storage class specified
1> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtr1common(421) : see reference to class template instantiation 'std::_Has_result_type<_Ty>' being compiled
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtr1common(421): error C3557: a function cannot have both a return type and a late-specified return type
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtr1common(421): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(203): error C3557: a function cannot have both a return type and a late-specified return type
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(203): warning C4042: 'std::plus<void>::operator ()' : has bad storage class
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(203): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(218): error C3557: a function cannot have both a return type and a late-specified return type
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(218): warning C4042: 'std::minus<void>::operator ()' : has bad storage class
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(218): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(233): error C3557: a function cannot have both a return type and a late-specified return type
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(233): warning C4042: 'std::multiplies<void>::operator ()' : has bad storage class
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(233): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(248): error C3557: a function cannot have both a return type and a late-specified return type
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(248): warning C4042: 'std::equal_to<void>::operator ()' : has bad storage class
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(248): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(263): error C3557: a function cannot have both a return type and a late-specified return type
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(263): warning C4042: 'std::less<void>::operator ()' : has bad storage class
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xstddef(263): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

最佳答案

我遇到了同样的问题,发现标记/Zc:auto设置为/Zc:auto-,这导致了所有错误。

您似乎没有在命令行中指定它,但是它可以帮助其他人遇到相同类型的错误。

Zc:auto

关于visual-studio-2010 - 无法构建-将VC++代码从VS2010迁移到VS2013,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27902075/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com