How to resolve this error?(using EVC4.0+sp2)
-
Hello,All, I write a wave audio player for ppc2002 by using EVC3.0 and it's working fine on ppc2002, then I new a empty project and add all files into the project,but I got some errors after building project by using EVC4+sp2. the configuration selection are 1.standardsdk 2.cpu=wince armv4 3.default=pocketpc the error message are --------------------Configuration: ceaudio4 - Win32 (WCE ARMV4) Release-------------------- Compiling... audio.cpp Linking... uafxwce.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in coredll.lib(COREDLL.dll) uafxwce.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in coredll.lib(COREDLL.dll) uafxwce.lib(afxmem.obj) : warning LNK4006: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in coredll.lib(COREDLL.dll); second definition ignored uafxwce.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in coredll.lib(COREDLL.dll); second definition ignored Creating library ARMV4Rel/ceaudio4.lib and object ARMV4Rel/ceaudio4.exp corelibc.lib(pegwmain.obj) : error LNK2019: unresolved external symbol WinMain referenced in function WinMainCRTStartup ARMV4Rel/ceaudio4.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. ceaudio4.exe - 4 error(s), 2 warning(s) Does anyone know how to resolve this problem? Thanks. Joye Liu
-
Hello,All, I write a wave audio player for ppc2002 by using EVC3.0 and it's working fine on ppc2002, then I new a empty project and add all files into the project,but I got some errors after building project by using EVC4+sp2. the configuration selection are 1.standardsdk 2.cpu=wince armv4 3.default=pocketpc the error message are --------------------Configuration: ceaudio4 - Win32 (WCE ARMV4) Release-------------------- Compiling... audio.cpp Linking... uafxwce.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in coredll.lib(COREDLL.dll) uafxwce.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in coredll.lib(COREDLL.dll) uafxwce.lib(afxmem.obj) : warning LNK4006: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in coredll.lib(COREDLL.dll); second definition ignored uafxwce.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in coredll.lib(COREDLL.dll); second definition ignored Creating library ARMV4Rel/ceaudio4.lib and object ARMV4Rel/ceaudio4.exp corelibc.lib(pegwmain.obj) : error LNK2019: unresolved external symbol WinMain referenced in function WinMainCRTStartup ARMV4Rel/ceaudio4.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. ceaudio4.exe - 4 error(s), 2 warning(s) Does anyone know how to resolve this problem? Thanks. Joye Liu
Had the same problem! It's because C Run-Time libraries are linked before MFC libraries. Take a look at http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q148/6/52.asp&NoWebContent=1[^] for the solution!