[DGD]Calling CPP Functions from an Extension

Tim Vernum tpv at acay.com.au
Fri Jan 19 04:22:51 CET 2001


>	I get the following link errors:

>nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator
>new(unsigned int)" (??2 at YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)

>nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void

>*)"
>(??3 at YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj)

>.\Debug/dgd.exe : fatal error LNK1169: one or more multiply defined symbols
found

Disclaimer, I haven't done any VC++ development in almost a year.

Your problem is that you're including operator new, and operator delete in two
libs.

Once in LIBCMTD.lib, and then again in nafxcwd.lib
Now I'm not sure why that is happening when you add in an extra
 cpp file, but the first step is to look and see if you are
 explictly linking against both those libs. If so, then stop :)

But, IIRC, afx is related to pre-compiled headers, so it might have some problem
there... like I said it's been a year.

But the basic problem is that new/delete are coming in twice, and you can't
do that.

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list