By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,220 Members | 1,473 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,220 IT Pros & Developers. It's quick & easy.

error LNK2016: Absolute symbol '@comp.id' used as target of REL32relocation

P: n/a
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

I have searched on Google and not got much joy.

I have tried everything I can think of and am getting very frustrated.

Can anyone help me please?

Many thanks.
Sep 19 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a

<aj******@hushmail.comha scritto nel messaggio
news:c6**********************************@b1g2000h sg.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

Sep 19 '08 #2

P: n/a
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.
Sep 22 '08 #3

P: n/a
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.
Sep 22 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.