Visual studio Link error.
- From: xorbathegeek@xxxxxxxxx
- Date: 21 Sep 2005 21:17:16 -0700
On Visual Studio .Net, I compiled the XMP-SDK library provided
by Adobe. The lib file appeared as expected in
C:\XMP-SDK\XMP-SDK\public\libraries\windows\debug\XMPCore.lib.
I then tried linking my program (Aardplugin) with
this library. I went to project->properties->Linker->Input
and added XMPCore.lib as an addition dependency. I then
went to project->properties->Linker->General and added
C:\XMP-SDK\XMP-SDK\public\libraries\windows\debug as an
Additional Library Directory. When I linked, I got
the following messages:
XMPCore.lib(XMP_Impl.obj) : error LNK2005: "void __cdecl operator
delete(void *)" (??3@YAXPAX@Z) already defined in
msvcrtd.lib(MSVCR71D.dll)
XMPCore.lib(XMP_Impl.obj) : error LNK2005: "void __cdecl operator
delete[](void *)" (??_V@YAXPAX@Z) already defined in
msvcrtd.lib(MSVCR71D.dll)
XMPCore.lib(XMP_Impl.obj) : warning LNK4006: "void __cdecl operator
delete(void *)" (??3@YAXPAX@Z) already defined in
msvcrtd.lib(MSVCR71D.dll); second definition ignored
XMPCore.lib(XMP_Impl.obj) : warning LNK4006: "void __cdecl operator
delete[](void *)" (??_V@YAXPAX@Z) already defined in
msvcrtd.lib(MSVCR71D.dll); second definition ignored
The actual linker command line looks like:
/OUT:"Debug/Aardplugin.dll" /INCREMENTAL /NOLOGO
/LIBPATH:"C:\XMP-SDK\XMP-SDK\public\libraries\windows\debug"
/DLL /DEF:".\Aardplugin.def" /DEBUG /ASSEMBLYDEBUG
/PDB:"Debug/Aardplugin.pdb" /SUBSYSTEM:WINDOWS /NOENTRY
/IMPLIB:"Debug/Aardplugin.lib" /MACHINE:X86 XMPCore.lib
"\Xmp-sdk\Xmp-sdk\public\libraries\windows\debug\XMPCore.lib"
I have no clue where the second full path XMPCore.lib line came from,
but I did not expect this.
I looked around on the net and found this page:
http://support.microsoft.com/default.aspx?scid=kb;en-us;q148652
and so I tried Solution 1 with msvcrtd.lib. I still got the same
errors.
So I set /verbose:lib, and found the following:
Searching C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\lib\msvcrtd.lib:
Searching
C:\XMP-SDK\XMP-SDK\public\libraries\windows\debug\XMPCore.lib:
XMPCore.lib(XMP_Impl.obj) : error LNK2005: "void * __cdecl operator
new(unsigned int)" (??2@YAPAXI@Z) already defined in
msvcrtd.lib(MSVCR71D.dll)
XMPCore.lib(XMP_Impl.obj) : error LNK2005: "void __cdecl operator
delete(void *)" (??3@YAXPAX@Z) already defined in
msvcrtd.lib(MSVCR71D.dll)
XMPCore.lib(XMP_Impl.obj) : error LNK2005: "void __cdecl operator
delete[](void *)" (??_V@YAXPAX@Z) already defined in
msvcrtd.lib(MSVCR71D.dll)
Searching
\Xmp-sdk\Xmp-sdk\public\libraries\windows\debug\XMPCore.lib:
So it does appear that the link error is with XMPCore.lib. So I do
have some sort of
problem there. However, does anyone out there know where the
\Xmp-sdk...XMPCore.lib
line comes from?
Thanks
.
- Prev by Date: Re: MS VC 6.0 compiles EXE differently under 2000 vs XP
- Next by Date: VS.NET 2003 C++ Editor
- Previous by thread: Re: Default PATH/Library/Include settings for MS VS C++ .NET 2003?
- Next by thread: VS.NET 2003 C++ Editor
- Index(es):
Relevant Pages
|