[Home]MsVc6

BOOST WIKI | RecentChanges | Preferences | Page List | Links List

Compiling for tool "msvc-stlport" fails with these errors repeated for many files:

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.


For those who have prebuilt binaries and use the MSVC IDE, another way may be to go to Tools/Options? menu, click Directories tab in the dialog, select "Include files" in the "Show directories for:" combobox, and move the Platform SDK path up or down the list of directories, depending on settings for the build.

==============

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).

john harris


BOOST WIKI | RecentChanges | Preferences | Page List | Links List
Edit text of this page | View other revisions
Last edited October 8, 2002 10:11 am (diff)
Search:
Disclaimer: This site not officially maintained by Boost Developers