[C++-sig] boost 1.29, MSVC++ & precompiled headers

greg Landrum greglandrum at mindspring.com
Tue Oct 15 17:25:54 CEST 2002


At 07:53 AM 10/15/2002, Charsley, Mark wrote:
>If I include "boost/python.hpp" in a precompiled header in MSVC++ (SP5) and
>try building it in debug mode, I get
>
><whole bunch ofC4275 warnings snipped>
>z:\thirdparty\boost\boost\ref.hpp(48) : fatal error C1001: INTERNAL COMPILER
>ERROR
>         (compiler file 'msc1.cpp', line 1794)
>          Please choose the Technical Support command on the Visual C++
>          Help menu, or open the Technical Support help file for more
>information
>Error executing cl.exe.
>
>It works fine in release mode and fine if I include it in a normal .cpp file
>outside of a precompiled header. Given how long it takes to compile
>"boost/python.hpp", however, getting it working inside a precompiled header
>would be _very_ nice. Anyone else seen this, and/or know of a fix?

In my use of Boost over the last year or so, these internal compiler errors 
happen pretty much constantly.  As you've already discovered, turning off 
precompiled headers or switching compilation modes can make them go away 
(but not always).  Sometimes switching the order of lines of code can clear 
them up.   Sometimes I haven't been able to solve the problem at all and 
have had to either give up or vastly restructure my code.

My simple-minded analysis is that the BPL really stresses C++ compilers and 
sometimes MSVC++ just falls down.

Good luck,
-greg





More information about the Cplusplus-sig mailing list