2010/04/11

Fatal Error C1060 of VC 2008

The fatal error C1060 occurs when I write certain grammar.

/boost/type_traits/remove_const.hpp
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,typename boost::detail::remove_const_impl<T>::type)

C1060 compiler is out of heap space

The operating system or run-time library cannot fill a request for memory.

Possible solutions

  • Use /Zm to increase memory allocation limit.
  • Increase the size of the Windows swap-file.
  • Close other running programs.
  • Eliminate unnecessary include files.
  • Eliminate unnecessary global variables.(For example, by allocating memory dynamically instead of declaring a large array.) Eliminate unused declarations.
  • Split the current file into smaller files.

Although the error has occurred before with some versions of Visual Studio (VC), the /Zm800 option could resolve it. But in this case, the option cannot resolve this error. The cl.exe uses about 1.6GB memory when I see by Task Manager. Furthermore, VC9's cl.exe sometimes causes application error during compiling this code, which is perhaps too large. Compiling XP has 3GB memory and other huge programs are not running. I will have to split the code.

I have not written separated rules in Spirit 2.x and not use Proto directly. I will study it.

No comments:

How to set parameters to debugging program on Visual Studio 2019 with CMake

Solution: MSDN Sometimes the "Debug and Launch Settings for CMake" bottun is disabled. In this case, change to the target view. ...