I use Visual Studio 2017. In a project (that I target as x64), I get error : C1060, compiler is out of heap space
, and sadly learned there happen to exist a memory limitation for compilation.
When monitoring CL.exe, it indeed stop just before reaching 4GB. So it looks like CL.exe is by default a 32-bit application, as seen at https://learn.microsoft.com/en-us/cpp/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line
After reading this page, I installed "Universal Windows Platform workload" hoping to get access to a 64-bit version of CL.exe. But no change when compiling my project, and I can't see a single option in visual studio to choose compiler version.
I assume that there must exist a workaround to be able to use more than 4GB for a single compilation unit, but I couldn't find it for now. Any help would be much appreciated.
Edit : I hit limitation in Debug mode. Compilation is doing fine in Release mode. Which is suppose makes sense.