Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Jessica Weiner
|
Mar 12, 2006 - 6:13 PM
|
I get the following linker error when I try to compiler my static mfc project:
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in libcmt.lib(malloc.obj) 1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __heap_alloc already defined in libcmt.lib(malloc.obj) 1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _calloc already defined in libcmt.lib(calloc.obj) 1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _realloc already defined in libcmt.lib(realloc.obj) 1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __recalloc already defined in libcmt.lib(realloc.obj)
How can this be fixed?
Thank you. Jess
|
|
Technical Support
|
Mar 13, 2006 - 6:20 AM
|
These errors mean that there is a conflict between two .LIB files which the linker tries to link together: - LIBCMTD.lib, which is a debug static version of C/C++ runtime library - LIBCMT.lib, which is a release static version of C/C++ runtime library This may mean that you are compiling the debug version of your project and the latter uses the static version of the C/C++ runtime library. Besides your project links together one or more other LIB files and some of them are based on the release version of C/C++ library. Please check all the modules used in your project. If you use Prof-UIS, there is no need to include any of Prof-UIS .LIB files in your project files list or add them to linker settings explicitly. Simply include the Prof-UIS.h file in your StdAfx.h file. The appropriate Prof-UIS .LIB file will be linked with your project automatically.
|
|