C:\PROGRA~1\MICROS~3\VC98\include\winbase.h(1011) : error C2733: second C linkage of overloaded function 'InterlockedIncremen? t' not allowed C:\PROGRA~1\MICROS~3\VC98\include\winbase.h(1009) : see declaration of 'InterlockedIncrement?' C:\PROGRA~1\MICROS~3\VC98\include\winbase.h(1018) : error C2733: second C linkage of overloaded function 'InterlockedDecremen? t' not allowed C:\PROGRA~1\MICROS~3\VC98\include\winbase.h(1016) : see declaration of 'InterlockedDecrement?' C:\PROGRA~1\MICROS~3\VC98\include\winbase.h(1026) : error C2733: second C linkage of overloaded function 'InterlockedExchange? ' not allowed C:\PROGRA~1\MICROS~3\VC98\include\winbase.h(1023) : see declaration of 'InterlockedExchange?'
This problem occurs when the Platform SDK is installed.
The PSDK include path must be searched before the standard MSVC includes. The bjam tool adds -I"C:\PROGRA~1\MICROS~3\VC98\include" to the cl command line, so that is searched before the PSDK include path which is specified in the environment.
An immediate solution is to have the PSDK include path searched first, using this bjam command line:
bjam -sTOOLS=msvc-stlport -sBUILD="debug release <stlport-iostream>on <sysinclude>C:\Progra~1\MIFD68~1\Include\." -sSTLPORT_PATH=c:\etc
NOTE: "C:\Progra~1\MIFD68~1\Include\." is the short form of "C:\Program Files\Microsoft SDK\Include" on my machine. YMMV.
This should probably be fixed in msvc-tools.jam which would somehow check if the PSDK is installed (by checking the environment?) and added to the header search path as needed.
Anyone else have problems with including boost in precompiled headers, then getting ICE (Internal Compiler Errors)? I have a workaround, at least for the one about iterator_adapters.hpp (you have to instantiate the iterator_adaptor type, even with an extern is fine, in the precompiled header header).