Link to home
Start Free TrialLog in
Avatar of Jax Logan
Jax Logan

asked on

MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _free already defined in LIBCMTD.lib

Hi,

I'm trying to compile a cpp program with a static library. It seems like some of the lib functions collide with the MFC...

I've tried ignoring the MSVCRTD library but then I get a whole bunch of unresolved symbol errors...

Any assistance appreciated.
Linking...
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgmalloc.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _isprint already defined in LIBCMTD.lib(_ctype.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __strdup already defined in LIBCMTD.lib(strdup.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _abort already defined in LIBCMTD.lib(abort.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _printf already defined in LIBCMTD.lib(printf.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _vprintf already defined in LIBCMTD.lib(vprintf.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fopen already defined in LIBCMTD.lib(fopen.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strchr already defined in LIBCMTD.lib(strchr.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strncmp already defined in LIBCMTD.lib(strncmp.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fread already defined in LIBCMTD.lib(fread.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _ftell already defined in LIBCMTD.lib(ftell.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fseek already defined in LIBCMTD.lib(fseek.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _atoi already defined in LIBCMTD.lib(atox.obj)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strtoul already defined in LIBCMTD.lib(strtol.obj)
MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jax Logan
Jax Logan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial