[flext] linker error when linking a library
Stefano Papetti
stefano.papetti at univr.it
Fri Aug 19 11:43:00 CEST 2011
Hi Thomas,
On 06/08/2011 11.35, Thomas Grill wrote:
> - a clash of the delete operator - this is usually caused by using
> different build models for parts that are linked. In your case it
> seems that the libraries LIBCPMT.LIB and LIBCMT.LIB don't fit to each
> other.
Just to resume, here's the error:
link /DLL /nologo /INCREMENTAL:NO /LIBPATH:"C:\_pd_"\bin
/LIBPATH:"C:\
_pd_"\bin /LIBPATH:"C:\_pd_"\flext test_ChambFilter~.obj
fftoourad.obj fftooura
f.obj BlkDsp.obj AudioSynth.obj SpecMath.obj pd.lib LIBCPMT.LIB
LIBCMT.LIB fl
ext-pd_s.lib /out:icst_chambfilt~.dll
flext-pd_s.lib(flext.obj) : error LNK2005: "void __cdecl operator
delete[](void
*)" (??_V at YAXPAX@Z) already defined in LIBCMT.LIB(delete2.obj)
flext-pd_s.lib(fldsp.obj) : error LNK2005: "void * __cdecl operator
new[](unsign
ed int)" (??_U at YAPAXI@Z) already defined in LIBCPMT.LIB(newaop.obj)
flext-pd_s.lib(fldsp.obj) : error LNK2005: "void __cdecl operator
delete[](void
*)" (??_V at YAXPAX@Z) already defined in LIBCMT.LIB(delete2.obj)
flext-pd_s.lib(flxlet.obj) : error LNK2005: "void * __cdecl operator
new[](unsig
ned int)" (??_U at YAPAXI@Z) already defined in LIBCPMT.LIB(newaop.obj)
flext-pd_s.lib(flxlet.obj) : error LNK2005: "void __cdecl operator
delete[](void
*)" (??_V at YAXPAX@Z) already defined in LIBCMT.LIB(delete2.obj)
flext-pd_s.lib(fllib.obj) : error LNK2005: "void * __cdecl operator
new[](unsign
ed int)" (??_U at YAPAXI@Z) already defined in LIBCPMT.LIB(newaop.obj)
flext-pd_s.lib(flmeth.obj) : error LNK2005: "void * __cdecl operator
new[](unsig
ned int)" (??_U at YAPAXI@Z) already defined in LIBCPMT.LIB(newaop.obj)
flext-pd_s.lib(flmeth.obj) : error LNK2005: "void __cdecl operator
delete[](void
*)" (??_V at YAXPAX@Z) already defined in LIBCMT.LIB(delete2.obj)
flext-pd_s.lib(flout.obj) : error LNK2005: "void * __cdecl operator
new[](unsign
ed int)" (??_U at YAPAXI@Z) already defined in LIBCPMT.LIB(newaop.obj)
flext-pd_s.lib(flitem.obj) : error LNK2005: "void * __cdecl operator
new[](unsig
ned int)" (??_U at YAPAXI@Z) already defined in LIBCPMT.LIB(newaop.obj)
flext-pd_s.lib(flitem.obj) : error LNK2005: "void __cdecl operator
delete[](void
*)" (??_V at YAXPAX@Z) already defined in LIBCMT.LIB(delete2.obj)
flext-pd_s.lib(flqueue.obj) : error LNK2005: "void * __cdecl
operator new[](unsi
gned int)" (??_U at YAPAXI@Z) already defined in LIBCPMT.LIB(newaop.obj)
flext-pd_s.lib(flqueue.obj) : error LNK2005: "void __cdecl operator
delete[](voi
d *)" (??_V at YAXPAX@Z) already defined in LIBCMT.LIB(delete2.obj)
flext-pd_s.lib(flatom.obj) : error LNK2005: "void * __cdecl operator
new[](unsig
ned int)" (??_U at YAPAXI@Z) already defined in LIBCPMT.LIB(newaop.obj)
flext-pd_s.lib(flatom.obj) : error LNK2005: "void __cdecl operator
delete[](void
*)" (??_V at YAXPAX@Z) already defined in LIBCMT.LIB(delete2.obj)
Creating library icst_chambfilt~.lib and object icst_chambfilt~.exp
icst_chambfilt~.dll : fatal error LNK1169: one or more multiply
defined symbols
found
NMAKE : fatal error U1077: '"c:\Programmi\Microsoft Visual Studio
10.0\VC\BIN\li
nk.EXE"' : return code '0x491'
Stop.
NMAKE : fatal error U1077: '"c:\Programmi\Microsoft Visual Studio
10.0\VC\BIN\nm
ake.exe"' : return code '0x2'
Stop.
Searching the web I've found a similar issue:
http://support.microsoft.com/kb/148652/en-us
however I couldn't fix my problem yet.
From what I see, one possible solution would be to link LIBCPMT.LIB and
LIBCMT.LIB before the other libraries.
On the other hand compiling the external as a shared library it works:
link /DLL /nologo /INCREMENTAL:NO /LIBPATH:"C:\_pd_"\bin /LIBPATH:"C:\
_pd_"\bin /LIBPATH:"C:\_pd_"\flext test_ChambFilter~.obj
fftoourad.obj fftooura
f.obj BlkDsp.obj AudioSynth.obj SpecMath.obj pthreadVC.lib pd.lib
LIBCMT.LIB
LIBCPMT.LIB flext-pd.lib /out:icst_chambfilt~.dll
Creating library icst_chambfilt~.lib and object icst_chambfilt~.exp
What do you think?
Best,
S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://grrrr.org/pipermail/flext/attachments/20110819/5b0f751c/attachment.htm>
More information about the flext
mailing list