Hello, I'm trying to compile the latest OregonCore version in Visual Studio Community 2015 with Update 2. Before you start asking me if I've installed all the software required I should let you know I have and that I followed the guide they have in their documentation. The problem lays in their code, I'm almost certain about that. So on to the problem then, whenever I try to compile the "ALL_BUILD" in the project I've generated with cmake it goes on for a while and then I get the following error messages:
I read up on it and obviously hash_map is deprecated and might get removed in the near future. I want to change it to an unordered_map or at least define the error so it gets ignored but I can't even seem to find anything that has to do with a hash map in the files other than this line in the PatchHandler.cpp file:
I'm not very experienced in c++ because I've mostly programmed in Java so I don't really understand what there is I need to change in order for the project to successfully compile. Would appriciate if anyone could enlighten me about this issue.
Code:
D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\tools\movements_extractor\VMapExtensions.cpp)
23> PatchHandler.cpp
23> RealmList.cpp
23> WheatyExceptionReport.cpp
23>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\oregonrealm\Console.cpp)
23>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\oregonrealm\AuthSocket.cpp)
20>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\tools\movements_extractor\TerrainBuilder.cpp)
23>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\oregonrealm\Main.cpp)
23>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\shared\Debugging\WheatyExceptionReport.cpp)
23>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\oregonrealm\RealmList.cpp)
20>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\tools\movements_extractor\generator.cpp)
20>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\tools\movements_extractor\MapBuilder.cpp)
22> Console.cpp
22> Main.cpp
22> Master.cpp
23>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\oregonrealm\PatchHandler.cpp)
22> OCSoap.cpp
22> RARunnable.cpp
22> RASocket.cpp
23>C:\Program Files (x86)\Windows Kits\8.1\Include\um\dbghelp.h(1544): warning C4091: 'typedef ': ignored on left of '' when no variable is declared (compiling source file D:\MJOC Server\src\shared\Debugging\WheatyExceptionReport.cpp)
22> WorldRunnable.cpp
23>C:\Program Files (x86)\Windows Kits\8.1\Include\um\dbghelp.h(3190): warning C4091: 'typedef ': ignored on left of '' when no variable is declared (compiling source file D:\MJOC Server\src\shared\Debugging\WheatyExceptionReport.cpp)
23>D:\MJOC Server\src\shared\Debugging\WheatyExceptionReport.cpp(1338): warning C4477: 'sprintf' : format string '%X' requires an argument of type 'unsigned int', but variadic argument 1 has type 'PDWORD'
23>D:\MJOC Server\src\shared\Debugging\WheatyExceptionReport.cpp(1349): warning C4477: 'sprintf' : format string '%X' requires an argument of type 'unsigned int', but variadic argument 1 has type 'PDWORD'
22> WheatyExceptionReport.cpp
22>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\oregoncore\Main.cpp)
22>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\oregoncore\Console.cpp)
22>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\oregoncore\OCSoap.cpp)
22>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\oregoncore\RASocket.cpp)
22>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\oregoncore\RARunnable.cpp)
22>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\oregoncore\Master.cpp)
22>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\oregoncore\WorldRunnable.cpp)
22>D:\Programs\Visual Studio\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. (compiling source file D:\MJOC Server\src\shared\Debugging\WheatyExceptionReport.cpp)
21>LINK : fatal error LNK1181: cannot open input file '..\..\collision\Release\collision.lib'
22>C:\Program Files (x86)\Windows Kits\8.1\Include\um\dbghelp.h(1544): warning C4091: 'typedef ': ignored on left of '' when no variable is declared (compiling source file D:\MJOC Server\src\shared\Debugging\WheatyExceptionReport.cpp)
22>C:\Program Files (x86)\Windows Kits\8.1\Include\um\dbghelp.h(3190): warning C4091: 'typedef ': ignored on left of '' when no variable is declared (compiling source file D:\MJOC Server\src\shared\Debugging\WheatyExceptionReport.cpp)
22>D:\MJOC Server\src\shared\Debugging\WheatyExceptionReport.cpp(1338): warning C4477: 'sprintf' : format string '%X' requires an argument of type 'unsigned int', but variadic argument 1 has type 'PDWORD'
22>D:\MJOC Server\src\shared\Debugging\WheatyExceptionReport.cpp(1349): warning C4477: 'sprintf' : format string '%X' requires an argument of type 'unsigned int', but variadic argument 1 has type 'PDWORD'
24>------ Build started: Project: ALL_BUILD, Configuration: Release Win32 ------
24> Building Custom Rule D:/MJOC Server/CMakeLists.txt
24> CMake does not need to re-run because D:\build\CMakeFiles\generate.stamp is up-to-date.
========== Build: 15 succeeded, 9 failed, 0 up-to-date, 0 skipped ==========
I read up on it and obviously hash_map is deprecated and might get removed in the near future. I want to change it to an unordered_map or at least define the error so it gets ignored but I can't even seem to find anything that has to do with a hash map in the files other than this line in the PatchHandler.cpp file:
Code:
// Store the result in the internal patch hash map
patches_[path] = new PATCH_INFO;
MD5_Final((ACE_UINT8*) & patches_[path]->md5, &ctx);
I'm not very experienced in c++ because I've mostly programmed in Java so I don't really understand what there is I need to change in order for the project to successfully compile. Would appriciate if anyone could enlighten me about this issue.