C3859: virtual memory range exceeded for PCH

I get this error message from time to time (not every time). I am compiling (EDIT: sorry, I didn’t explain here: I really meant "rebuild") my project in mixed mode. And Visual Studio tells me to "recompile with the command line option" -Zm114 "or more." In principle, there is no problem, I just do as VS says.

But there are currently two problems:

  • Why doesn't this happen every time I rebuild? If I understand correctly, the compiler ran out of memory when compiling my project. So if I do a reconnection that clears all previous work, should it not be over the next time if I don't change anything?

  • To be safe, I already specified a value of 120 for Zm (i.e. Zm120) in all configurations of this project. Why am I getting an error with this lower value? Or is suggested value 114 just a wild guess of VS?

+5
source share
3 answers

I know this is old, but I ended up here so that I could answer.

Here's a great article on PCH issues . .

1) , ?
, . , . , . :

  • , PCH , CL.EXE .
  • Windows .

( , ), , , :

c1xx: C3859: PCH [... Project.vcxproj] c1xx: : 1455:

2) ? (Zm114 Zm120)
, Zm120 (Release | Debug) Platform (x86 | x64).

PreferredToolArchtecture x64:

MSBuild , /p: PreferredToolArchtecture = x64 MSBuild. MSBuild Visual Studio, .vcxproj, PropertyGroup, .

, , . .

+4

, . , Visual Studio , , , , x86. , x64. , . , - .

0

. , , PCH, " " pch.h, " " .

Unsurprisingly, Visual Studio broke out very much because of this, in particular, due to numerous errors C3859during the build.

When parsing the project’s configuration for Inherit, this value was fixed.

0
source

Source: https://habr.com/ru/post/1648491/


All Articles