我有一个项目。它仅在链接时显示错误。
它显示了__getch alresdy定义的evnthough我忽略了特定的库MSVCR80D.dll它显示错误。
Plz在这方面帮助我......
使用/ verbose之后:
Processed /DEFAULTLIB:msvcprtd
Processed /DEFAULTLIB:MSVCRTD
Processed /DEFAULTLIB:OLDNAMES
Processed /DEFAULTLIB:MSVCMRTD
Processed /DEFAULTLIB:MSCOREE
Processed /DEFAULTLIB:uuid.lib
Processed /DEFAULTLIB:atlsd.lib
Processed /DEFAULTLIB:kernel32.lib
Processed /DEFAULTLIB:user32.lib
Processed /DEFAULTLIB:advapi32.lib
Processed /DEFAULTLIB:ole32.lib
Processed /DEFAULTLIB:shell32.lib
Processed /DEFAULTLIB:oleaut32.lib
Processed /DEFAULTLIB:shlwapi.lib
Processed /DEFAULTLIB:ws2_32.lib
Referenced in config.lib(configwrapper.obj)
Loaded msvcprtd.lib(MSVCP80D.dll)
msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " (?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ) already defined in ACEsd.lib(Log_Record.obj)
Found "__declspec(dllimport) public: int __thiscall std::ios_base::flags(void)const " (__imp_?flags@ios_base@std@@QBEHXZ)
Referenced in config.lib(serializetransport_settings.obj)
Referenced in config.lib(serializeretentionsettings.obj)
Referenced in s2libs.lib(operatingsystem.obj)
Referenced in s2libs.lib(errormajor.obj)
Loaded msvcprtd.lib(MSVCP80D.dll)
msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) already defined in ACEsd.lib(Log_Record.obj)
Found "__declspec(dllimport) public: int __thiscall std::ios_base::width(void)const " (__imp_?width@ios_base@std@@QBEHXZ)
Referenced in config.lib(serializetransport_settings.obj)
Referenced in config.lib(serializeretentionsettings.obj)
Referenced in s2libs.lib(operatingsystem.obj)
Referenced in s2libs.lib(errormajor.obj)
Referenced in config.lib(serializereplicationpairsettings.obj)
Referenced in config.lib(serializecdpsnapshotrequest.obj)
Referenced in config.lib(serializeatconfigmanagersettings.obj)
Referenced in config.lib(serializeretentioninformation.obj)
Referenced in config.lib(marshal.obj)
Referenced in config.lib(serializevolumegroupsettings.obj)
Referenced in config.lib(unmarshal.obj)
答案 0 :(得分:2)
查看项目设置,在Configuration Properties - &gt; C / C ++ - &gt;代码生成 - &gt;运行时库。
设置,无论是MD,MTD还是其他,都必须在您的库和ACE的库之间兼容。
你不应该手动忽略任何库,应该没有必要。