Virtual memory range for PCH exceeded on MSVC

Issue #408 resolved
Jing Dong created an issue

This error blocks compile on my windows machine (Visual Stdio 2015).

  • Wondering any other windows user see this?
  • Just add suggested command line option to fix?
1>c1xx : error C3859: virtual memory range for PCH exceeded; please recompile with a command line option of '-Zm295' or greater
1>c1xx : fatal error C1076: compiler limit: internal heap limit reached; use /Zm to specify a higher limit

Comments (6)

  1. Jing Dong reporter

    add suggested flags by

    if (MSVC)
        add_definitions(-Zm295)
    endif()
    

    does fix my problem. @dellaert if you like this option I can create a pull request.

  2. José Luis Blanco-Claraco

    It works nice with VS2017... so, what about?

    if(MSVC_VERSION LESS 1910) # older thanVS2017
    ...
    
  3. Log in to comment