Problem compiling on Windows for Visual Studio 2019

Hi, I have a few questions. I followed the for visual studio and I received a few errors I was hoping I could get some help with. I am new to development, just out of college and want to contribute in some way. Attached is a screenshot of the error list on my screen. As well, I am compiling in Visual Studio 2019 Community with all projects in the Cataclysm.sln targeted for Windows 10.0.17763.0 and the Platform toolset is Visual Studio 2015(v140). I also ran the copy_dll_to_bin script and placed the contents in the root folder. As for the linker errors I am wondering why it is specifically just the overmap.obj file and especially when all of the other obj files seem to have been generated just fine in the project debug and release folders. So far I am a bit stumped and any help would be awesome. Thanks!

Did you change anything before compiling? If so - your changes are invalid.

I did not, I followed the instructions as close as possible and when I went to initially build the project after ensuring that the build tools were set to VS 2015 (v140) and that the Windows SDK was set to windows 10.0.17763.0, I received the attached error list. No changes were made whatsoever to code and I was just performing an initial build.

It seems to all be related around lines 130-135 of overmap.cpp which is part of the Cataclysm-Lib project.

The errors read that “there is an illegal statement or sub-expression for ‘constexpr’ function” and “constexpr function can only have one return statement”. And the two linker errors are associated with being unable to find the overmap.obj. So I believe that if the error with this specific function, “constexpr bool has_segment( size_t line, om_direction::type dir)” is fixed then it would compile successfully. Only thing is I am a bit lost on which return statement is needed and which one can be tossed.

Thanks in advance for any help.

Are you on the most recent master?
If you aren’t there, there have been errors that prevented compiling in some environments in the past, so updating may fix it.

@anothersimulacrum I just forked the repository yesterday so it should be current. I still fetched upstream and checkout master and it looks like my branch is up to date with origin/master.

You do not need to change toolset to 140 or anything else in project files. This part of instruction is outdated.

See - we bumped toolset version to v141 (but didn’t update instruction yet).

I will update instruction in a few days (or you can try to create a PR to update it).

@Zhilkin Thanks! I will try that and see if I can update instructions. I really appreciate the help.