This issue occurs when compiling release versions of Orb_slam:
Error 2 C3859: The virtual memory range of the PCH is exceeded; Please use '-zm465 ' or a larger command line
To modify the method:
1. Find Engineering-> Properties->c/c++-> command line-> other options
2. Input/zm100, which can be larger after the number
Reason:
To expedite boost compilation, use a precompiled header. Plus boost's header file is more, causing the PCH file to exceed the default value.
Defined:
/zm (Specify the memory allocation limit for precompiled headers): Determines the amount of memory that the compiler allocates to construct precompiled headers. Format:/zmfactor.
Factor: A scaling factor that determines the amount of memory that the compiler uses to construct precompiled headers. The
Factor parameter is the percentage of the default size of the work buffer defined by the compiler. The default value for the factor parameter is 100 (%), but you can specify a larger or smaller quantity. In earlier versions of Visual C + +, the compiler used several discrete heaps, each of which had certain limitations. Currently, the compiler can dynamically increase the heap on demand, up to the total heap size limit, and only a fixed-size buffer is required to construct the precompiled header. Therefore, it is rarely necessary to/zm compiler options.
If you use the/ZM compiler option and the compiler uses the heap space to emit a C1060 error message, you may have kept too much memory. You may consider removing the/ZM option. If the compiler emits a C1076 error message, the accompanying C3859 message specifies the factor parameters that you should use when recompiling the program with the/ZM compiler option.
Factor value memory allocation limit
10 7.5 MB
100 MB
200 MB
1000 750 MB
2000 1500 MB