Visual Studio: attribute 'nodiscard' requires compiler flag '/std:c++17'

Viewed 353

Im following this guide: https://www.azerothcore.org/wiki/Installation I am trying to compile build 6a95e61 with no additional modules under win64 and get 439 identical errors. They point to different files after like half a minute when selecting build/build solution in Visual Studio:

C2429 attribute 'nodiscard' requires compiler flag '/std:c++17' (compiling source file C:\Azerothcore\azerothcore\src\server\shared\DataStores\DBCDatabaseLoader.cpp) shared c:\azerothcore\azerothcore\src\common\datastores\dbcfileloader.h 38

enter image description here

A full wipe and starting over from git-bash yields the same results, so i guess im making mistakes in the process, any suggestion is appreciated.

1 Answers

Big thanks to the guys on azerothcore discord! Steps which solved it for me:

  • Uninstalling Visual Studio 2017 and cMake 3.8.2
  • Installing Visual Studio 2019 with all dependancies in "Desktop Development with C++" and
  • Installing cMake 3.19.2
  • re-Built with cMake (as in the official guide)
  • Build/Build Solution in Visual Studio (as in the official guide)
Related