UE 5.8 fails to compile with Visual Studio 2026 (hash_map missing) — Source fix

Summary
1>  Result: Failed (OtherCompilationError)
1>  Total execution time: 33797.48 seconds
1>  Trace written to file E:\UnrealEngine\Engine\Programs\UnrealBuildTool\Trace.uba with size 5.0mb
1>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat -Target="UnrealEditor Win64 Development" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild -architecture=x64" exited with code 6.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 12:12 PM and took 09:23:28.886 hours ==========

image

Summary
1>E:\UnrealEngine\Engine\Source\ThirdParty\nvtesslib\inc\nvtess.h(154,1): fatal error C1083: Cannot open include file: 'hash_map': No such file or directory
1>  #include <hash_map>

I’m compiling an Unreal Engine 5.8 source code using Visual Studio 2026. After compiling for a few hours, I’m getting the following error:

E:\UnrealEngine\Engine\Source\ThirdParty\nvtesslib\inc\nvtess.h(154,1): fatal error C1083: Cannot open include file: 'hash_map': No such file or directory
#include <hash_map>

Is UE 5.8 expected to be compatible with Visual Studio 2026, or is this a compatibility issue with nvtesslib?

My vs 2026 config:

Summary



Epic is asking me for MSVC:

Preferred: 14.50.35717
Current: 14.51.36248

I cannot select another one since it comes by default.

There’s nothing like editing the engine, right guys?

Imagine having to come and see what you’re doing…

Summary
#if USE_HASHMAP
#if PLATFORM_MAC || PLATFORM_LINUX
#include <unordered_map>
#include <vector>
#else
#include <hash_map>
#endif
#else
#include <map>
#endif

image

Summary
#elif USE_HASHMAP
		typedef stdext::hash_map<Edge, Edge> EdgeDict;
		typedef stdext::hash_map<nv::Vector3, Corner> PositionDict;

With MSVC 14.51, it seems that <hash_map> is no longer available (or at least not where that code expects to find it). It seems that this code hasn’t been updated when the compiler changed.

I’m getting rid of the platform-specific code like #if PLATFORM_MAC || PLATFORM_LINUX, which I understand was for legacy systems, and if not, then to keep it.

Changed:

Summary
#if USE_HASHMAP
#include <unordered_map>
#include <vector>
#else
#include <map>
#endif

image

Summary
#elif USE_HASHMAP
		typedef std::unordered_map<Edge, Edge> EdgeDict;
		typedef std::unordered_map<nv::Vector3, Corner> PositionDict;

I’m getting a bit tired of having to look up every little thing for the new version. If you’re going to set a version that’s compatible with “VS 2026,” one bad synchronization with Microsoft and you’ll leave us developers out of the game. Please, a little more professionalism.

I can’t be keeping track of every existing library you remove or don’t remove. It really annoys me.

What are we waiting for?

The Visual Studio 2026 “MSVC” needs to be synchronized with Unreal Engine. We’ve seen that I can’t select the corresponding “MSVC”.

You’re welcome, regards.