Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-08-19 11:38:04


From: "Martin Schuerch" <mschuerch_at_[hidden]>
> Hi
>
> In a VC project with boost, ATL and mangaged extensions I get the
following
> link error:
>
> PPFacadeNet.obj : error LNK2022: metadata operation failed (80131195) :
> Custom attributes are not consistent: (0x0c0006cd).
> LINK : fatal error LNK1254: metadata for symbol
> '?InterlockedExchange_at_winapi@detail_at_boost@@$$J18YGJPCJJ_at_Z' inconsistent
with
> COFF symbol table
>
> When I include <windows.h> in winapi.hpp and make the hacks:
>
> typedef CRITICAL_SECTION critical_section;
>
>
> inline long_type InterlockedIncrement(long_type volatile * x){ return
> ::InterlockedIncrement(x); }

[...]

> Then it works.

Yes. The point of winapi.hpp is to avoid <windows.h> but it seems that the
.NET strict checks interfere.

If you find a way to make winapi.hpp work in /clr mode without including
<windows.h> let me know. The other option is to include your version in
#ifdef BOOST_USE_WINDOWS_H (or is there a predefined macro to detect /clr?)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk