1
Programming / compilation issues with Visual Studio 2012 : C2977 and std::tuple
« on: June 29, 2016, 01:48:35 am »
Please note:
- that this does not directly concern Open XCOM, but rather the Yaml library it relies on,
- that I don't have permissions to modify the wiki pages (neither here nor on the yaml project), so I can't just add the info there,
- that I'm only just posting this here because it may help someone out in the future.
Symptoms :
- After generating the Visual Studio 2012 (Visual Studio 11) solution using CMake, when you try to build it, you get a bunch of "C2977" compiling errors complaining about std::tuple.
Solution:
1) right-click on the yaml-cpp-whatever project inside Visual Studio
2) Properties, C/C++, Preprocessor, All Configurations All Platforms, Preprocessor Definitions, <Edit...>
3) add before <different options> the following row :
_VARIADIC_MAX=10;
4) Now yaml should build properly
Explanations :
- This is caused by a poorly chosen setting in VS2012, that was later fixed in VS2013
- More explanations here : https://stackoverflow.com/questions/8274588/c2977-stdtuple-too-many-template-arguments-msvc11
- that this does not directly concern Open XCOM, but rather the Yaml library it relies on,
- that I don't have permissions to modify the wiki pages (neither here nor on the yaml project), so I can't just add the info there,
- that I'm only just posting this here because it may help someone out in the future.
Symptoms :
- After generating the Visual Studio 2012 (Visual Studio 11) solution using CMake, when you try to build it, you get a bunch of "C2977" compiling errors complaining about std::tuple.
Solution:
1) right-click on the yaml-cpp-whatever project inside Visual Studio
2) Properties, C/C++, Preprocessor, All Configurations All Platforms, Preprocessor Definitions, <Edit...>
3) add before <different options> the following row :
_VARIADIC_MAX=10;
4) Now yaml should build properly
Explanations :
- This is caused by a poorly chosen setting in VS2012, that was later fixed in VS2013
- More explanations here : https://stackoverflow.com/questions/8274588/c2977-stdtuple-too-many-template-arguments-msvc11