Dyer, Nigel wrote:
Hi Volodya
The two boost libraries that cause problems are boost/test and boost/lambda, and if I remove them all is fine in this example.
So, you have a workaround?
The problem only appears with <link>static. If there is no <link>static requirement then I get an error message saying that the bio-pch.h.gch is not used because BOOST_SYSTEM_DYN_LINK us defined.
Well, you can add <use>/boost/filesystem//boost_filesystem to the requirements of our pch target so that the PCH is built withe the same defines as the your executable.
I assume that this means that precompiled headers are incompatible with dynamic link builds, although this does not appear to be mentioned.
No, this means that PCH should be built with *exactly* the same compiler options, including defines.
If I define the exe as below in a static build the precompiled header builds with no problems and the code links with no errors. I suspect that by not having the pch as a source this means it is not working as a pch however
exe nigel : Lexer/BiobaseLexer.cpp Lexer/ArrayLexer.cpp #/boost/filesystem//boost_filesystem main_nigel.cpp : <variant>static:<source>bio-pch
There's no such variant as 'static', FWIW. There's <link>static - Volodya