G
Guest
Hi there,
I've been working with dynamic libraries for a quite big software and now
and then I may get some weird linking errors, like following
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _fprintf already defined in
libcmtd.lib(fprintf.obj)
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _swprintf already defined in
libcmtd.lib(swprintf.obj)
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _free already defined in
libcmtd.lib(dbgheap.obj)
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _malloc already defined in
libcmtd.lib(dbgheap.obj)
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _printf already defined in
libcmtd.lib(printf.obj)
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _strchr already defined in
libcmtd.lib(strchr.obj)
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _sprintf already defined in
libcmtd.lib(sprintf.obj)
The symbols invovled in the linking errors are actually some basic c++
library functions and I used them in many other places. The problem
disappeared for some unknown reason before, but this time they just refuse to
go. Any idea what's causing the problem and what I should do to get rid of
this kind of problem. Suggestions are really appreciated. Thanks.
rich
I've been working with dynamic libraries for a quite big software and now
and then I may get some weird linking errors, like following
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _fprintf already defined in
libcmtd.lib(fprintf.obj)
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _swprintf already defined in
libcmtd.lib(swprintf.obj)
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _free already defined in
libcmtd.lib(dbgheap.obj)
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _malloc already defined in
libcmtd.lib(dbgheap.obj)
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _printf already defined in
libcmtd.lib(printf.obj)
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _strchr already defined in
libcmtd.lib(strchr.obj)
MSVCRTD.lib(MSVCR71D.dll) : error LNK2005: _sprintf already defined in
libcmtd.lib(sprintf.obj)
The symbols invovled in the linking errors are actually some basic c++
library functions and I used them in many other places. The problem
disappeared for some unknown reason before, but this time they just refuse to
go. Any idea what's causing the problem and what I should do to get rid of
this kind of problem. Suggestions are really appreciated. Thanks.
rich