Default libraries conflict

  • Thread starter Fish in a Barrel
  • Start date
F

Fish in a Barrel

I'm trying to write a managed C++ application with unicode support in
visual studio 2003. I'm getting the following link errors, however:

uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator
new(unsigned int)" (??2@YAPAXI@Z) already defined in
libcpmtd.lib(newop.obj)
uafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator
delete(void *)" (??3@YAXPAX@Z) already defined in
LIBCMTD.lib(dbgdel.obj)
uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator
new[](unsigned int)" (??_U@YAPAXI@Z) already defined in
libcpmtd.lib(newaop.obj)
uafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator
delete[](void *)" (??_V@YAXPAX@Z) already defined in
LIBCMTD.lib(delete2.obj)

Anyone have any ideas why?
 
G

Guest

I'm trying to write a managed C++ application with unicode support in
visual studio 2003. I'm getting the following link errors, however:

uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator
new(unsigned int)" (??2@YAPAXI@Z) already defined in
libcpmtd.lib(newop.obj)
uafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator
delete(void *)" (??3@YAXPAX@Z) already defined in
LIBCMTD.lib(dbgdel.obj)
uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator
new[](unsigned int)" (??_U@YAPAXI@Z) already defined in
libcpmtd.lib(newaop.obj)
uafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator
delete[](void *)" (??_V@YAXPAX@Z) already defined in
LIBCMTD.lib(delete2.obj)

Anyone have any ideas why?

Hi,
I suspect that your problem is that CRT and MFC libraries are linked in the
wrong order.
see:
http://support.microsoft.com/default.aspx?scid=kb;en-us;q148652
for more information on how to solve this problem.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top