При компиляции dll использую ключ /MT (Runtime library: Multi-threaded).
При линковании возникают подобные ошибки:
Linking...
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _realloc already defined in LIBCMT.lib(realloc.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _fflush already defined in LIBCMT.lib(fflush.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _getenv already defined in LIBCMT.lib(getenv.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _memmove already defined in LIBCMT.lib(memmove.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __errno already defined in LIBCMT.lib(dosmap.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _strncmp already defined in LIBCMT.lib(strncmp.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _isspace already defined in LIBCMT.lib(_ctype.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _isalnum already defined in LIBCMT.lib(_ctype.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _tolower already defined in LIBCMT.lib(tolower.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _strchr already defined in LIBCMT.lib(strchr.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __tzset already defined in LIBCMT.lib(tzset.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _isupper already defined in LIBCMT.lib(_ctype.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _isalpha already defined in LIBCMT.lib(_ctype.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _isdigit already defined in LIBCMT.lib(_ctype.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __control87 already defined in LIBCMT.lib(ieee87.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __clearfp already defined in LIBCMT.lib(ieee87.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __close already defined in LIBCMT.lib(close.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _fclose already defined in LIBCMT.lib(fclose.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __lseeki64 already defined in LIBCMT.lib(lseeki64.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __write already defined in LIBCMT.lib(write.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __get_osfhandle already defined in LIBCMT.lib(osfinfo.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __open_osfhandle already defined in LIBCMT.lib(osfinfo.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _wcslen already defined in LIBCMT.lib(wcslen.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _strrchr already defined in LIBCMT.lib(strrchr.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
MSVCRT.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 LIBCMT.lib(typinfo.obj)
Creating library ..\..\Bin\Release\KeyGenerationBlock\KeyGenerationBlock_s.lib and object ..\..\Bin\Release\KeyGenerationBlock\KeyGenerationBlock_s.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
..\..\Bin\Release\KeyGenerationBlock\KeyGenerationBlock_s.dll : fatal error LNK1169: one or more multiply defined symbols found
Results
Build log was saved at "file://d:\Projects\Win32\Obj\Release\KeyGenerationBlock\BuildLog.htm"
KeyGenerationBlock_s - 30 error(s), 1 warning(s)
Как отключить ненужный уже MSVCRT? Заранее благодарен.
Сообщение отредактировал Litkevich Yuriy - 3.2.2009, 14:00