"Peter Dimov" <[EMAIL PROTECTED]> wrote in message 002901c2a789$02a54960$1d00a8c0@pdimov2">news:002901c2a789$02a54960$1d00a8c0@pdimov2... > From: "Martin Schuerch" <[EMAIL PROTECTED]> > > Hi > > > > I already posted once the following problem (solution). The problem is > still > > there in the code of the boost repository. I doesn't know if there are > > reasons to not apply the patch, (e.g. global namespace polution) or if the > > post was missed. > > > > Problem: > > In my project (some files are compiled with the /CLR flag) I get the > > following link error under VC7. > > > > pplib.lib(PPFacadeNet.obj) : error LNK2022: metadata operation failed > > (80131195) : Custom attributes are not consistent: (0x0c0008f2). > > LINK : fatal error LNK1254: metadata for symbol > > '?InterlockedExchange@winapi@detail@boost@@$$J18YGJPCJJ@Z' inconsistent > with > > COFF symbol table > > > > The problem is (after a long search), that the forward declarations of > e.g. > > InterlockedExchange (win32) are inside a namespace. When they are global > it > > works. > > [...] > > > extern "C" __declspec(dllimport) boost::detail::winapi::long_type > __stdcall > > InterlockedIncrement(boost::detail::winapi::long_type volatile *); > > extern "C" __declspec(dllimport) boost::detail::winapi::long_type > __stdcall > > InterlockedDecrement(boost::detail::winapi::long_type volatile *); > > extern "C" __declspec(dllimport) boost::detail::winapi::long_type > __stdcall > > InterlockedExchange(boost::detail::winapi::long_type volatile *, > > boost::detail::winapi::long_type); > > But won't these collide with the declarations in <windows.h>?
No. I tried by including the widely used shared_ptr.hpp and windows.h (non 64 bit branch). Why should it, as long as the types exactly match the once in windows.h? Martin _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost