Boost logo

Boost :

From: Anthony Williams (anthwil_at_[hidden])
Date: 2002-08-20 03:15:59


Martin Schürch writes:
>
>
> "Peter Dimov" <pdimov_at_[hidden]> wrote in message
> news:<011101c2479e$cad9c730$1d00a8c0_at_pdimov2>...
> >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?)
>
> I know of none macro.

_MANAGED is predefined if /clr is specified.

Anthony


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