I have a C++ project with a lot of templates and it fails to compile with fatal error C1060: compiler is out of heap space
. There's plenty of free RAM. I tried paying with /Zm compiler option, but it didn't help. I can see that Visual Studio uses the 32 bit version of the compiler and I think this is the reason for this error. Is there any way to force Visual Studio to use 64 bit compiler instead?
UPDATE
My question is not a duplicate. I saw the other questions and tried the suggestions. But in my case the compiler takes more than 6 GB of RAM to compile the project. It was the maximal amount of RAM allocated by the 64 bit compiler. I can use the 64 bit compiler when building my project using msbuild
, but I want to build it from Visual Studio and it's using 32 bit compiler by default. I want to force it to use the 64 bit compiler. By 64 bit compiler I mean the compiler that not only creates a 64 bit applications, but which is a 64 bit application itself.