Boost logo

Boost-Build :

From: Daniel Lidström (daniel.lidstrom_at_[hidden])
Date: 2006-10-24 03:41:28

Vladimir Prus scribbled:

> Hi,
> I've just committed the attached patch, which makes PCH work on msvc
> without requiring a .cpp file -- the .cpp file will be
> created automatically.

It would be nice if it was possible to put the precompiled header in a
For example, here is what I tried to do (my sources are in GFL/):

# Pre-compiled header
cpp-pch PreCompile
    : GFL/PreCompile.h
    : <toolset>msvc:<source>GFL/PreCompile.cpp

lib GFL-1_0
    : PreCompile # Pre-compiled header

This works with gcc toolset, but not msvc. The problem is that I include
in all cpp-files but the compiler switch is -Yu"PreCompile.h". It has to be
Otherwise the compiler complains:

compile-c-c++ bin\msvc-7.1\debug\threading-multi\Alignment.obj
C:\projects\trunk\GFL\GFL\LandXML\Alignment.cpp(139) : fatal error C1010:
unexpected end of file while looking for precompiled header directive


Phone: +4687112090
Fax : +4687112098
       59 14'10" N
       18 00'09" E

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at