Does anyone have problem compiling FreeOrion using Microsoft Visual Studio 2015 Update 3?
I follow the instruction at http://freeorion.org/index.php/Compile_In_Windows and got the "master" from GitHub. I am not sure if this is the latest or not. I have to change the Target Platform Version from 8.1 to 10.0.14393.0 otherwise it complains about missing header files. But now I am stuck at
Error C2996 'CombatEvent::serialize': recursive function template definition Common D:\VS\2015\Gaming\FreeOrion\FreeOrion\combat\CombatEvents.cpp 1172
I search the forum but didn't find anyone mention C2996 but searching the web did return 1 hit. It's 3 years old and whatever the problem is it was fixed in Boost 1.56. https://svn.boost.org/trac/boost/ticket/10348
I am not sure what is the actual cause of the error message because I don't know where to look for the problem. Line 1172 is the end of the file. I looked through CombatEvents.cpp but didn't actually see any problem. Any idea what is going on?
MSVC 2015 Compilation Error C2996
Moderator: Committer
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: MSVC 2015 Compilation Error C2996
Where / how do you change this setting?FOFOFOFO wrote:I have to change the Target Platform Version from 8.1 to 10.0.14393.0 ...
Re: MSVC 2015 Compilation Error C2996
Right click on each of the projects (Common, FreeOrion, FreeOrionCA, etc), select Properties.Geoff the Medio wrote:Where / how do you change this setting?FOFOFOFO wrote:I have to change the Target Platform Version from 8.1 to 10.0.14393.0 ...
At Project Properties Pages, under Configuration Properties->General->Target Platform Version.
This is only needed because I think Visual Studio does not install Windows 8.1 SDK or CRT or something by default. Anyway I only have Windows 10 installed.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: MSVC 2015 Compilation Error C2996
Can you get the 8.1 version of the Windows SDK (which I thought used to be called Platform Toolset)? I thought the various SDKs were specific to the MSVC version, not the OS version, though I haven't been cross-compiling for different Windows versions.
Re: MSVC 2015 Compilation Error C2996
Okay I am downloading it now. It will probably take awhile. I should be able to find out tomorrow.Geoff the Medio wrote:Can you get the 8.1 version of the Windows SDK (which I thought used to be called Platform Toolset)? I thought the various SDKs were specific to the MSVC version, not the OS version, though I haven't been cross-compiling for different Windows versions.
Re: MSVC 2015 Compilation Error C2996
FOFOFOFO wrote:Okay I am downloading it now. It will probably take awhile. I should be able to find out tomorrow.Geoff the Medio wrote:Can you get the 8.1 version of the Windows SDK (which I thought used to be called Platform Toolset)? I thought the various SDKs were specific to the MSVC version, not the OS version, though I haven't been cross-compiling for different Windows versions.
I installed Windows 8.1 SDK from https://developer.microsoft.com/en-us/w ... ws-8-1-sdk
Is this the one you want me to install?
Change Target Platform version to 8.1 (Project properties->Configuration Properties->General->Target Platform Version = 8.1)
Rebuild Solution
Got tons of "cannot open source file ..." error on header files such as string.h, wchar.h
Change Target Platform version to 10.0.10586.0
Rebuild Solution
Got a few C2996 recursive function template definition errors