c++ - Visual Studio 2013 linker confusion -
i following errors when compiling(running build in vs) latest project. have read other questions/answers here on site, far no luck fix issues.
i know problems related linking different libraries, why problems don't know.
the compiling has been working ok before, no can't rid of errors.
any fine.
here error list , configuration file
>1>msvcprt.lib(msvcp100.dll) : error lnk2005: "void __cdecl std::_xlength_error(char const *)" (?_xlength_error@std@@yaxpbd@z) defined in libcpmt.lib(xthrow.obj) 1>msvcrt.lib(msvcr100.dll) : error lnk2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@qae@abqbd@z) defined in libcmt.lib(stdexcpt.obj) 1>msvcrt.lib(msvcr100.dll) : error lnk2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@uae@xz) defined in libcmt.lib(stdexcpt.obj) 1>msvcrt.lib(msvcr100.dll) : error lnk2005: __vsnprintf_s defined in libcmt.lib(vsnprnc.obj) 1>msvcrt.lib(msvcr100.dll) : error lnk2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@qae@abv01@@z) defined in libcmt.lib(stdexcpt.obj) 1>msvcrt.lib(msvcr100.dll) : error lnk2005: _atoi defined in libcmt.lib(atox.obj) 1>msvcrt.lib(msvcr100.dll) : error lnk2005: _memmove defined in libcmt.lib(memmove.obj) 1>msvcrt.lib(msvcr100.dll) : error lnk2005: _printf defined in libcmt.lib(printf.obj) 1>msvcrt.lib(ti_inst.obj) : error lnk2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@aae@abv0@@z) defined in libcmt.lib(typinfo.obj) 1>msvcrt.lib(ti_inst.obj) : error lnk2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@aaeaav0@abv0@@z) defined in libcmt.lib(typinfo.obj) 1>link : warning lnk4098: defaultlib 'msvcrt' conflicts use of other libs; use /nodefaultlib:library
>
<?xml version="1.0" encoding="utf-8"?> <project defaulttargets="build" toolsversion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <itemgroup label="projectconfigurations"> <projectconfiguration include="debug|win32"> <configuration>debug</configuration> <platform>win32</platform> </projectconfiguration> <projectconfiguration include="release|win32"> <configuration>release</configuration> <platform>win32</platform> </projectconfiguration> </itemgroup> <propertygroup label="globals"> <projectguid>{94cf9190-4dc8-4b09-9579-cf385879d9b5}</projectguid> <keyword>win32proj</keyword> <rootnamespace>oc</rootnamespace> <sccprojectname>sak</sccprojectname> <sccauxpath>sak</sccauxpath> <scclocalpath>sak</scclocalpath> <sccprovider>sak</sccprovider> <projectname>ocp4ngx</projectname> </propertygroup> <import project="$(vctargetspath)\microsoft.cpp.default.props" /> <propertygroup condition="'$(configuration)|$(platform)'=='debug|win32'" label="configuration"> <configurationtype>application</configurationtype> <usedebuglibraries>true</usedebuglibraries> <platformtoolset>v100</platformtoolset> <characterset>multibyte</characterset> </propertygroup> <propertygroup condition="'$(configuration)|$(platform)'=='release|win32'" label="configuration"> <configurationtype>application</configurationtype> <usedebuglibraries>false</usedebuglibraries> <platformtoolset>v100</platformtoolset> <wholeprogramoptimization>true</wholeprogramoptimization> <characterset>multibyte</characterset> </propertygroup> <import project="$(vctargetspath)\microsoft.cpp.props" /> <importgroup label="extensionsettings"> </importgroup> <importgroup label="propertysheets" condition="'$(configuration)|$(platform)'=='debug|win32'"> <import project="$(userrootdir)\microsoft.cpp.$(platform).user.props" condition="exists('$(userrootdir)\microsoft.cpp.$(platform).user.props')" label="localappdataplatform" /> </importgroup> <importgroup label="propertysheets" condition="'$(configuration)|$(platform)'=='release|win32'"> <import project="$(userrootdir)\microsoft.cpp.$(platform).user.props" condition="exists('$(userrootdir)\microsoft.cpp.$(platform).user.props')" label="localappdataplatform" /> </importgroup> <propertygroup label="usermacros" /> <propertygroup condition="'$(configuration)|$(platform)'=='debug|win32'"> <linkincremental>true</linkincremental> </propertygroup> <propertygroup condition="'$(configuration)|$(platform)'=='release|win32'"> <linkincremental>false</linkincremental> <ignoreimportlibrary>true</ignoreimportlibrary> </propertygroup> <itemdefinitiongroup condition="'$(configuration)|$(platform)'=='debug|win32'"> <clcompile> <precompiledheader>notusing</precompiledheader> <warninglevel>level3</warninglevel> <optimization>disabled</optimization> <preprocessordefinitions>win32;_debug;_windows;%(preprocessordefinitions)</preprocessordefinitions> <sdlcheck>true</sdlcheck> <runtimelibrary>multithreadeddebug</runtimelibrary> </clcompile> <link> <subsystem>windows</subsystem> <generatedebuginformation>true</generatedebuginformation> <additionaloptions>simconnect.lib wsock32.lib %(additionaloptions)</additionaloptions> <additionallibrarydirectories>c:\program files %28x86%29\lockheed martin\prepar3d v2 sdk 2.1.9936.0\utilities\simconnect sdk\lib;%(additionallibrarydirectories)</additionallibrarydirectories> </link> </itemdefinitiongroup> <itemdefinitiongroup condition="'$(configuration)|$(platform)'=='release|win32'"> <clcompile> <warninglevel>level3</warninglevel> <precompiledheader>notusing</precompiledheader> <optimization>maxspeed</optimization> <functionlevellinking>true</functionlevellinking> <intrinsicfunctions>true</intrinsicfunctions> <preprocessordefinitions>win32;ndebug;_windows;%(preprocessordefinitions)</preprocessordefinitions> <sdlcheck>true</sdlcheck> <minimalrebuild>true</minimalrebuild> <runtimelibrary>multithreaded</runtimelibrary> <favorsizeorspeed>speed</favorsizeorspeed> </clcompile> <link> <subsystem>windows</subsystem> <generatedebuginformation>true</generatedebuginformation> <enablecomdatfolding>true</enablecomdatfolding> <optimizereferences>true</optimizereferences> <additionallibrarydirectories>c:\program files %28x86%29\lockheed martin\prepar3d v2 sdk 2.1.9936.0\utilities\simconnect sdk\lib;%(additionallibrarydirectories)</additionallibrarydirectories> <additionaloptions>simconnect.lib wsock32.lib %(additionaloptions)</additionaloptions> </link> </itemdefinitiongroup> <itemgroup> <text include="oc.txt" /> <text include="readme.txt" /> </itemgroup> <itemgroup> <clinclude include="err.h" /> <clinclude include="iocpclient.h" /> <clinclude include="logger.h" /> <clinclude include="ngxconnector.h" /> <clinclude include="oc.h" /> <clinclude include="pmdg_ngx_sdk.h" /> <clinclude include="resource.h" /> <clinclude include="settings.h" /> <clinclude include="simconnect.h" /> <clinclude include="stdafx.h" /> <clinclude include="targetver.h" /> </itemgroup> <itemgroup> <clcompile include="err.cpp" /> <clcompile include="iocpclient.cpp" /> <clcompile include="logger.cpp" /> <clcompile include="ngxconnector.cpp" /> <clcompile include="oc.cpp" /> <clcompile include="settings.cpp" /> <clcompile include="stdafx.cpp"> <precompiledheader condition="'$(configuration)|$(platform)'=='debug|win32'">create</precompiledheader> <precompiledheader condition="'$(configuration)|$(platform)'=='release|win32'">create</precompiledheader> </clcompile> <clcompile include="var_event.cpp" /> </itemgroup> <itemgroup> <resourcecompile include="oc.rc" /> </itemgroup> <itemgroup> <image include="oc.ico" /> <image include="small.ico" /> </itemgroup> <itemgroup> <none include="ocrc.txt" /> </itemgroup> <import project="$(vctargetspath)\microsoft.cpp.targets" /> <importgroup label="extensiontargets"> </importgroup> </project>
did see following answer? resolving lnk4098: defaultlib 'msvcrt' conflicts with
there helps there.
Comments
Post a Comment