On 22 Sep, 09:21, ajtay...@hushmail.com wrote:
On 19 Sep, 18:49, "Giovanni Dicanio"
<giovanniDOTdica...@REMOVEMEgmail.comwrote:
<ajtay...@hushmail.comha scritto nel messaggionews:c6********************************** @b1g2000hsg.googlegroups.com...
>I have an set of unmanaged *C++ libraries that I have been
successfully using in a C++/CLI assembly which is in turn used by some
other .NET code (ASP.NET/C#). The C++ makes a lot of use of Boost and
STL. This is all working in VS 2005
I moved to VS 2008 and compiled up Boost 1_36
I have subsequently applied SP1 to VS2008.
When I attempt to compile and link the C++/CLI I get the error
error LNK2016: Absolute symbol '...@comp.id' used as target of REL32
relocation
Have you tried a complete rebuild of all your DLLs and .EXE using VS2008
SP1?
Giovanni
I am going to try that this morning. Currently rebuilding Boost 1_36
with SP1.
I am not overly optimistic that will resolve it to be honest.
May have to go back to using VS 2005.
It seems I can make this error go away by removing my use of
#pragma unmanaged
#pragma managed
and
#ifdef _MANAGED
#pragma managed(push, off)
#endif
#ifdef _MANAGED
#pragma managed(pop)
#endif
The confusing thing is that I need to add these pragmas in VS 2005 as
I was getting all sorts of compile time and runtime errors mainly it
has to be said using the BOOST libs.
In the end I wrapped the boost #includes in these pragmas and my
problems went away.
Now in VS 2008 it seems that these are the cause of my LNK2016 errors.
I haven't done much testing of this code - will report back if have
any further errors.