Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Compile error LNK2038 when statically linking  (Read 3141 times)

0 Members and 1 Guest are viewing this topic.

JamesYeoman

  • Newbie
  • *
  • Posts: 17
    • View Profile
Compile error LNK2038 when statically linking
« on: May 20, 2017, 08:44:13 pm »
Ok. So I had gotten Visual Studio 2017 installed and then thought to myself "I haven't done any SFML in ages. I'll give it a go in this new version of Visual Studio. It can't be so hard can it?"...

Microsoft - 1, Naive programmer - 0.

I have spent about 3 hours trying to figure it out but anything I could think of that would be to do with the static linking just wouldn't make it work.

I much prefer static linking to dynamic linking as it means that I don't have to copy about 10 different DLLs to the execution directory.

Anyway, below is the .vcxproj of the Project Solution that I had created and went through the steps as specified on the SFML website.

        <?xml version="1.0" encoding="utf-8"?>
        <Project DefaultTargets="Build" ToolsVersion="15.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>
                <ProjectConfiguration Include="Debug|x64">
                  <Configuration>Debug</Configuration>
                  <Platform>x64</Platform>
                </ProjectConfiguration>
                <ProjectConfiguration Include="Release|x64">
                  <Configuration>Release</Configuration>
                  <Platform>x64</Platform>
                </ProjectConfiguration>
          </ItemGroup>
          <PropertyGroup Label="Globals">
                <VCProjectVersion>15.0</VCProjectVersion>
                <ProjectGuid>{548B855F-C2B9-4548-B8A1-438588BFD563}</ProjectGuid>
                <Keyword>Win32Proj</Keyword>
                <RootNamespace>SFMLNoConsole</RootNamespace>
                <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
          </PropertyGroup>
          <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
          <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
                <ConfigurationType>Application</ConfigurationType>
                <UseDebugLibraries>true</UseDebugLibraries>
                <PlatformToolset>v140</PlatformToolset>
                <CLRSupport>false</CLRSupport>
          </PropertyGroup>
          <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
                <ConfigurationType>Application</ConfigurationType>
                <UseDebugLibraries>false</UseDebugLibraries>
                <PlatformToolset>v140</PlatformToolset>
                <WholeProgramOptimization>false</WholeProgramOptimization>
                <CharacterSet>Unicode</CharacterSet>
          </PropertyGroup>
          <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
                <ConfigurationType>Application</ConfigurationType>
                <UseDebugLibraries>true</UseDebugLibraries>
                <PlatformToolset>v141</PlatformToolset>
                <CharacterSet>Unicode</CharacterSet>
          </PropertyGroup>
          <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
                <ConfigurationType>Application</ConfigurationType>
                <UseDebugLibraries>false</UseDebugLibraries>
                <PlatformToolset>v141</PlatformToolset>
                <WholeProgramOptimization>true</WholeProgramOptimization>
                <CharacterSet>Unicode</CharacterSet>
          </PropertyGroup>
          <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
          <ImportGroup Label="ExtensionSettings">
          </ImportGroup>
          <ImportGroup Label="Shared">
          </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>
          <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
                <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|x64'">
                <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)'=='Debug|x64'">
                <LinkIncremental>true</LinkIncremental>
          </PropertyGroup>
          <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
                <LinkIncremental>true</LinkIncremental>
          </PropertyGroup>
          <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
                <LinkIncremental>false</LinkIncremental>
          </PropertyGroup>
          <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
                <ClCompile>
                  <PrecompiledHeader>NotUsing</PrecompiledHeader>
                  <WarningLevel>Level3</WarningLevel>
                  <Optimization>Disabled</Optimization>
                  <PreprocessorDefinitions>SFML_STATIC;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
                  <DebugInformationFormat>None</DebugInformationFormat>
                  <AdditionalIncludeDirectories>W:\SFML\SFML-2.4.2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
                  <MinimalRebuild>false</MinimalRebuild>
                  <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
                  <FunctionLevelLinking>true</FunctionLevelLinking>
                  <CallingConvention>Cdecl</CallingConvention>
                  <CompileAs>CompileAsCpp</CompileAs>
                  <CompileAsManaged>false</CompileAsManaged>
                  <CompileAsWinRT>false</CompileAsWinRT>
                </ClCompile>
                <Link>
                  <SubSystem>NotSet</SubSystem>
                  <AdditionalLibraryDirectories>W:\SFML\SFML-2.4.2\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
                  <AdditionalDependencies>sfml-graphics-s-d.lib;sfml-window-s-d.lib;sfml-system-s-d.lib;opengl32.lib;freetype.lib;jpeg.lib;winmm.lib;gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
                </Link>
          </ItemDefinitionGroup>
          <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
                <ClCompile>
                  <PrecompiledHeader>
                  </PrecompiledHeader>
                  <WarningLevel>Level3</WarningLevel>
                  <Optimization>Disabled</Optimization>
                  <PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
                </ClCompile>
                <Link>
                  <SubSystem>Windows</SubSystem>
                </Link>
          </ItemDefinitionGroup>
          <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
                <ClCompile>
                  <WarningLevel>Level3</WarningLevel>
                  <PrecompiledHeader>NotUsing</PrecompiledHeader>
                  <Optimization>Disabled</Optimization>
                  <FunctionLevelLinking>true</FunctionLevelLinking>
                  <IntrinsicFunctions>false</IntrinsicFunctions>
                  <PreprocessorDefinitions>SFML_STATIC;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
                  <DebugInformationFormat>None</DebugInformationFormat>
                  <AdditionalIncludeDirectories>W:\SFML\SFML-2.4.2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
                  <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
                  <CallingConvention>Cdecl</CallingConvention>
                  <CompileAs>CompileAsCpp</CompileAs>
                  <CompileAsManaged>false</CompileAsManaged>
                  <CompileAsWinRT>false</CompileAsWinRT>
                </ClCompile>
                <Link>
                  <SubSystem>Windows</SubSystem>
                  <EnableCOMDATFolding>true</EnableCOMDATFolding>
                  <OptimizeReferences>true</OptimizeReferences>
                  <AdditionalLibraryDirectories>W:\SFML\SFML-2.4.2\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
                  <AdditionalDependencies>sfml-graphics-s.lib;sfml-window-s.lib;sfml-system-s.lib;opengl32.lib;freetype.lib;jpeg.lib;winmm.lib;gdi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
                </Link>
          </ItemDefinitionGroup>
          <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
                <ClCompile>
                  <WarningLevel>Level3</WarningLevel>
                  <PrecompiledHeader>
                  </PrecompiledHeader>
                  <Optimization>MaxSpeed</Optimization>
                  <FunctionLevelLinking>true</FunctionLevelLinking>
                  <IntrinsicFunctions>true</IntrinsicFunctions>
                  <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
                </ClCompile>
                <Link>
                  <SubSystem>Windows</SubSystem>
                  <EnableCOMDATFolding>true</EnableCOMDATFolding>
                  <OptimizeReferences>true</OptimizeReferences>
                </Link>
          </ItemDefinitionGroup>
          <ItemGroup>
                <ClCompile Include="main.cpp" />
          </ItemGroup>
          <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
          <ImportGroup Label="ExtensionTargets">
          </ImportGroup>
        </Project>
 

Pastebin copy of the cxproj text just incase someone wants the syntax highlighting of pastebin
Thank you whoever edited the post to include the code tags. I didn't know the syntax they would use and I couldn't find anything useful in the formatting options.  :-[

Any ideas?

EDIT

Here is the compiler output in text

  main.cpp
sfml-graphics-s-d.lib(Color.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(Shape.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(CircleShape.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(RenderTarget.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(RenderWindow.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(RenderStates.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(Transform.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(Transformable.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(VertexArray.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(Texture.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(View.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(GLExtensions.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(GLCheck.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(Image.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(Glsl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(VideoMode.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(Window.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(Context.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(VideoModeImpl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(GlContext.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(WindowImpl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(WglContext.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(JoystickManager.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(SensorManager.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(WglExtensions.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(Joystick.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-window-s-d.lib(JoystickImpl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-system-s-d.lib(String.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-system-s-d.lib(Err.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
sfml-system-s-d.lib(ThreadLocal.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in main.obj
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z) already defined in libcpmtd.lib(stdthrow.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in libcpmtd.lib(xlock.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in libcpmtd.lib(xlock.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) already defined in libcpmtd.lib(locale.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __int64 __thiscall std::ios_base::width(void)const " (?width@ios_base@std@@QBE_JXZ) already defined in libcpmtd.lib(locale.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __int64 __thiscall std::ios_base::width(__int64)" (?width@ios_base@std@@QAE_J_J@Z) already defined in libcpmtd.lib(locale.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z) already defined in libcpmtd.lib(locale.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::widen(char)const " (?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "void __cdecl std::_Xbad_alloc(void)" (?_Xbad_alloc@std@@YAXXZ) already defined in libcpmtd.lib(xthrow.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z) already defined in libcpmtd.lib(xthrow.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z) already defined in libcpmtd.lib(xthrow.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __thiscall std::locale::id::operator unsigned int(void)" (??Bid@locale@std@@QAEIXZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) already defined in libcpmtd.lib(locale0.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: bool __thiscall std::codecvt_base::always_noconv(void)const " (?always_noconv@codecvt_base@std@@QBE_NXZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: int __thiscall std::codecvt<char,char,struct _Mbstatet>::in(struct _Mbstatet &,char const *,char const *,char const * &,char *,char *,char * &)const " (?in@?$codecvt@DDU_Mbstatet@@@std@@QBEHAAU_Mbstatet@@PBD1AAPBDPAD3AAPAD@Z) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: int __thiscall std::codecvt<char,char,struct _Mbstatet>::out(struct _Mbstatet &,char const *,char const *,char const * &,char *,char *,char * &)const " (?out@?$codecvt@DDU_Mbstatet@@@std@@QBEHAAU_Mbstatet@@PBD1AAPBDPAD3AAPAD@Z) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: int __thiscall std::codecvt<char,char,struct _Mbstatet>::unshift(struct _Mbstatet &,char *,char *,char * &)const " (?unshift@?$codecvt@DDU_Mbstatet@@@std@@QBEHAAU_Mbstatet@@PAD1AAPAD@Z) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: static unsigned int __cdecl std::codecvt<char,char,struct _Mbstatet>::_Getcat(class std::locale::facet const * *,class std::locale const *)" (?_Getcat@?$codecvt@DDU_Mbstatet@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" (??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: virtual __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::~basic_streambuf<char,struct std::char_traits<char> >(void)" (??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::eback(void)const " (?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::gptr(void)const " (?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pptr(void)const " (?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::egptr(void)const " (?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setg(char *,char *,char *)" (?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::epptr(void)const " (?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Gndec(void)" (?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Gninc(void)" (?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Pninc(void)" (?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Init(void)" (?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Init(char * *,char * *,int *,char * *,char * *,int *)" (?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: virtual __thiscall std::basic_ios<char,struct std::char_traits<char> >::~basic_ios<char,struct std::char_traits<char> >(void)" (??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: __thiscall std::basic_ios<char,struct std::char_traits<char> >::basic_ios<char,struct std::char_traits<char> >(void)" (??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(bool)" (?_Init@locale@std@@CAPAV_Locimp@12@_N@Z) already defined in libcpmtd.lib(locale0.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >(void)" (??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: virtual __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::~basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >(void)" (??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: unsigned short __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::sputc(wchar_t)" (?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z) already defined in libcpmtd.lib(wlocale.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: wchar_t * __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::eback(void)const " (?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: wchar_t * __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::gptr(void)const " (?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: wchar_t * __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::pptr(void)const " (?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: wchar_t * __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::egptr(void)const " (?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::gbump(int)" (?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::setg(wchar_t *,wchar_t *,wchar_t *)" (?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: wchar_t * __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::epptr(void)const " (?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::pbump(int)" (?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::setp(wchar_t *,wchar_t *)" (?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: wchar_t * __thiscall std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> >::_Pninc(void)" (?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: virtual __thiscall std::basic_ios<wchar_t,struct std::char_traits<wchar_t> >::~basic_ios<wchar_t,struct std::char_traits<wchar_t> >(void)" (??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: void __thiscall std::basic_ios<wchar_t,struct std::char_traits<wchar_t> >::setstate(int,bool)" (?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: __thiscall std::basic_ios<wchar_t,struct std::char_traits<wchar_t> >::basic_ios<wchar_t,struct std::char_traits<wchar_t> >(void)" (??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __thiscall std::basic_ostream<wchar_t,struct std::char_traits<wchar_t> >::basic_ostream<wchar_t,struct std::char_traits<wchar_t> >(class std::basic_streambuf<wchar_t,struct std::char_traits<wchar_t> > *,bool)" (??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: virtual __thiscall std::basic_ostream<wchar_t,struct std::char_traits<wchar_t> >::~basic_ostream<wchar_t,struct std::char_traits<wchar_t> >(void)" (??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: wchar_t __thiscall std::ctype<wchar_t>::widen(char)const " (?widen@?$ctype@_W@std@@QBE_WD@Z) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char __thiscall std::ctype<wchar_t>::narrow(wchar_t,char)const " (?narrow@?$ctype@_W@std@@QBED_WD@Z) already defined in libcpmtd.lib(wlocale.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: static unsigned int __cdecl std::ctype<wchar_t>::_Getcat(class std::locale::facet const * *,class std::locale const *)" (?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z) already defined in libcpmtd.lib(wcout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setp(char *,char *)" (?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::basic_ostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" (??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z) already defined in libcpmtd.lib(cout.obj)
msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::`vbase destructor'(void)" (??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in libcpmtd.lib(cout.obj)
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
sfml-window-s-d.lib(JoystickImpl.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-system-s-d.lib(String.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-window-s-d.lib(WglContext.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-window-s-d.lib(JoystickManager.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-window-s-d.lib(WglExtensions.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-window-s-d.lib(Window.cpp.obj) : warning LNK4217: locally defined symbol __invalid_parameter imported in function __catch$??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z$0
sfml-window-s-d.lib(VideoModeImpl.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-window-s-d.lib(GlContext.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-window-s-d.lib(WindowImpl.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-graphics-s-d.lib(GLCheck.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-graphics-s-d.lib(Image.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4217: locally defined symbol __invalid_parameter imported in function "int __cdecl stbi__compute_transparency(struct stbi__png *,unsigned char * const,int)" (?stbi__compute_transparency@@YAHPAUstbi__png@@QAEH@Z)
sfml-window-s-d.lib(VideoMode.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-graphics-s-d.lib(Shape.cpp.obj) : warning LNK4217: locally defined symbol __invalid_parameter imported in function "void __cdecl std::_Deallocate(void *,unsigned int,unsigned int)" (?_Deallocate@std@@YAXPAXII@Z)
sfml-graphics-s-d.lib(VertexArray.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-graphics-s-d.lib(Texture.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4049: locally defined symbol __invalid_parameter imported
sfml-window-s-d.lib(JoystickImpl.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-system-s-d.lib(String.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-window-s-d.lib(WglContext.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-window-s-d.lib(JoystickManager.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-window-s-d.lib(WindowImplWin32.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-window-s-d.lib(WglExtensions.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-window-s-d.lib(Window.cpp.obj) : warning LNK4217: locally defined symbol __CrtDbgReportW imported in function "public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::sentry::~sentry(void)" (??1sentry@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@XZ)
sfml-window-s-d.lib(VideoModeImpl.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-window-s-d.lib(GlContext.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-window-s-d.lib(WindowImpl.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-graphics-s-d.lib(GLCheck.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-graphics-s-d.lib(Image.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-window-s-d.lib(VideoMode.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-graphics-s-d.lib(Shape.cpp.obj) : warning LNK4217: locally defined symbol __CrtDbgReportW imported in function "void __cdecl std::_Deallocate(void *,unsigned int,unsigned int)" (?_Deallocate@std@@YAXPAXII@Z)
sfml-graphics-s-d.lib(VertexArray.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-graphics-s-d.lib(Texture.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4049: locally defined symbol __CrtDbgReportW imported
sfml-system-s-d.lib(String.cpp.obj) : warning LNK4049: locally defined symbol _memmove imported
sfml-window-s-d.lib(WindowImpl.cpp.obj) : warning LNK4217: locally defined symbol _memmove imported in function "public: void __thiscall std::_Deque_alloc<struct std::_Deque_base_types<class sf::Event,class std::allocator<class sf::Event> > >::_Alloc_proxy(void)" (?_Alloc_proxy@?$_Deque_alloc@U?$_Deque_base_types@VEvent@sf@@V?$allocator@VEvent@sf@@@std@@@std@@@std@@QAEXXZ)
sfml-window-s-d.lib(WglContext.cpp.obj) : warning LNK4049: locally defined symbol _memmove imported
sfml-window-s-d.lib(WglExtensions.cpp.obj) : warning LNK4049: locally defined symbol _memmove imported
sfml-window-s-d.lib(JoystickImpl.cpp.obj) : warning LNK4049: locally defined symbol _memmove imported
sfml-graphics-s-d.lib(Glsl.cpp.obj) : warning LNK4049: locally defined symbol _memmove imported
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4049: locally defined symbol _memmove imported
sfml-window-s-d.lib(VideoMode.cpp.obj) : warning LNK4217: locally defined symbol _memmove imported in function "public: void __thiscall std::_Wrap_alloc<class std::allocator<struct std::_Container_proxy> >::deallocate(struct std::_Container_proxy *,unsigned int)" (?deallocate@?$_Wrap_alloc@V?$allocator@U_Container_proxy@std@@@std@@@std@@QAEXPAU_Container_proxy@2@I@Z)
sfml-window-s-d.lib(GlContext.cpp.obj) : warning LNK4049: locally defined symbol _memmove imported
sfml-graphics-s-d.lib(Texture.cpp.obj) : warning LNK4217: locally defined symbol _memmove imported in function "unsigned char * __cdecl std::_Copy_memmove<unsigned char const *,unsigned char *>(unsigned char const *,unsigned char const *,unsigned char *)" (??$_Copy_memmove@PBEPAE@std@@YAPAEPBE0PAE@Z)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4049: locally defined symbol _memmove imported
sfml-graphics-s-d.lib(GLCheck.cpp.obj) : warning LNK4217: locally defined symbol _memmove imported in function "void __cdecl sf::priv::glCheckError(char const *,unsigned int,char const *)" (?glCheckError@priv@sf@@YAXPBDI0@Z)
sfml-graphics-s-d.lib(Image.cpp.obj) : warning LNK4217: locally defined symbol _memmove imported in function "public: __thiscall std::_Vector_val<struct std::_Simple_types<unsigned char> >::_Vector_val<struct std::_Simple_types<unsigned char> >(void)" (??0?$_Vector_val@U?$_Simple_types@E@std@@@std@@QAE@XZ)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol __invalid_parameter_noinfo imported in function _memcpy_s
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol __errno imported in function _memcpy_s
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol ___std_exception_copy imported in function "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z)
sfml-system-s-d.lib(String.cpp.obj) : warning LNK4217: locally defined symbol ___std_exception_copy imported in function "public: void __thiscall std::_Wrap_alloc<class std::allocator<char> >::construct<char *,char * &>(char * *,char * &)" (??$construct@PADAAPAD@?$_Wrap_alloc@V?$allocator@D@std@@@std@@QAEXPAPADAAPAD@Z)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol ___std_exception_destroy imported in function "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ)
sfml-system-s-d.lib(String.cpp.obj) : warning LNK4217: locally defined symbol ___std_exception_destroy imported in function "public: __thiscall std::_Wrap_alloc<class std::allocator<struct std::_Container_proxy> >::_Wrap_alloc<class std::allocator<struct std::_Container_proxy> ><struct std::_Wrap_alloc<class std::allocator<unsigned short> > &>(struct std::_Wrap_alloc<class std::allocator<unsigned short> > &)" (??$?0AAU?$_Wrap_alloc@V?$allocator@G@std@@@std@@@?$_Wrap_alloc@V?$allocator@U_Container_proxy@std@@@std@@@std@@QAE@AAU?$_Wrap_alloc@V?$allocator@G@std@@@1@@Z)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol __get_stream_buffer_pointers imported in function "protected: void __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::_Init(struct _iobuf *,enum std::basic_filebuf<char,struct std::char_traits<char> >::_Initfl)" (?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol _fclose imported in function "public: class std::basic_filebuf<char,struct std::char_traits<char> > * __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::close(void)" (?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ)
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4049: locally defined symbol _fclose imported
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol _fflush imported in function "protected: virtual int __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::sync(void)" (?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol _fgetc imported in function "bool __cdecl std::_Fgetc<char>(char &,struct _iobuf *)" (??$_Fgetc@D@std@@YA_NAADPAU_iobuf@@@Z)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol _fgetpos imported in function "protected: virtual class std::fpos<struct _Mbstatet> __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::seekoff(__int64,int,int)" (?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@U_Mbstatet@@@2@_JHH@Z)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol _fputc imported in function "bool __cdecl std::_Fputc<char>(char,struct _iobuf *)" (??$_Fputc@D@std@@YA_NDPAU_iobuf@@@Z)
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4049: locally defined symbol _fputc imported
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol _fsetpos imported in function "protected: virtual class std::fpos<struct _Mbstatet> __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::seekpos(class std::fpos<struct _Mbstatet>,int)" (?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@U_Mbstatet@@@2@V32@H@Z)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol __fseeki64 imported in function "protected: virtual class std::fpos<struct _Mbstatet> __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::seekoff(__int64,int,int)" (?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@U_Mbstatet@@@2@_JHH@Z)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol _fwrite imported in function "protected: bool __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::_Endwrite(void)" (?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ)
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4049: locally defined symbol _fwrite imported
sfml-system-s-d.lib(Err.cpp.obj) : warning LNK4049: locally defined symbol _fwrite imported
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol _setvbuf imported in function "protected: virtual class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::setbuf(char *,__int64)" (?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAD_J@Z)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol _ungetc imported in function "bool __cdecl std::_Ungetc<char>(char const &,struct _iobuf *)" (??$_Ungetc@D@std@@YA_NABDPAU_iobuf@@@Z)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol __lock_file imported in function "public: virtual void __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::_Lock(void)" (?_Lock@?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAEXXZ)
sfml-graphics-s-d.lib(Shader.cpp.obj) : warning LNK4217: locally defined symbol __unlock_file imported in function "public: virtual void __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::_Unlock(void)" (?_Unlock@?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAEXXZ)
sfml-graphics-s-d.lib(GLCheck.cpp.obj) : warning LNK4217: locally defined symbol _memchr imported in function "public: static char const * __cdecl std::char_traits<char>::find(char const *,unsigned int,char const &)" (?find@?$char_traits@D@std@@SAPBDPBDIABD@Z)
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4217: locally defined symbol _frexp imported in function _frexpf
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4217: locally defined symbol _ldexp imported in function _ldexpf
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4217: locally defined symbol _free imported in function _stbi_image_free
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4217: locally defined symbol _malloc imported in function "void * __cdecl stbi__malloc(unsigned int)" (?stbi__malloc@@YAPAXI@Z)
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4217: locally defined symbol _strtol imported in function "float * __cdecl stbi__hdr_load(struct stbi__context *,int *,int *,int *,int)" (?stbi__hdr_load@@YAPAMPAUstbi__context@@PAH11H@Z)
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4217: locally defined symbol _feof imported in function "void __cdecl stbi__start_callbacks(struct stbi__context *,struct stbi_io_callbacks *,void *)" (?stbi__start_callbacks@@YAXPAUstbi__context@@PAUstbi_io_callbacks@@PAX@Z)
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4217: locally defined symbol _fseek imported in function _stbi_load_from_file
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4217: locally defined symbol _ftell imported in function _stbi_info_from_file
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4217: locally defined symbol ___stdio_common_vfprintf imported in function __vfprintf_l
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : warning LNK4217: locally defined symbol _tolower imported in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl `anonymous namespace'::toLower(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?toLower@?A0x0a864e12@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V23@@Z)
sfml-window-s-d.lib(WglContext.cpp.obj) : warning LNK4217: locally defined symbol _wcslen imported in function "public: static unsigned int __cdecl std::char_traits<wchar_t>::length(wchar_t const *)" (?length@?$char_traits@_W@std@@SAIPB_W@Z)
sfml-window-s-d.lib(JoystickImpl.cpp.obj) : warning LNK4217: locally defined symbol _wcslen imported in function "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z)
sfml-system-s-d.lib(String.cpp.obj) : warning LNK4049: locally defined symbol _wcslen imported
sfml-system-s-d.lib(Err.cpp.obj) : warning LNK4217: locally defined symbol ___acrt_iob_func imported in function "private: virtual int __thiscall `anonymous namespace'::DefaultErrStreamBuf::sync(void)" (?sync@DefaultErrStreamBuf@?A0x2692305a@@EAEHXZ)
sfml-graphics-s-d.lib(RenderTarget.cpp.obj) : error LNK2019: unresolved external symbol __imp___wassert referenced in function "unsigned int __cdecl `anonymous namespace'::factorToGlConstant(enum sf::BlendMode::Factor)" (?factorToGlConstant@?A0x3d0fd62d@@YAIW4Factor@BlendMode@sf@@@Z)
sfml-graphics-s-d.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol __imp___wassert
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2001: unresolved external symbol __imp___wassert
sfml-window-s-d.lib(GlContext.cpp.obj) : error LNK2001: unresolved external symbol __imp___wassert
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol __imp__realloc referenced in function "int __cdecl stbi__zexpand(struct stbi__zbuf *,char *,int)" (?stbi__zexpand@@YAHPAUstbi__zbuf@@PADH@Z)
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol __imp__fopen_s referenced in function "struct _iobuf * __cdecl stbi__fopen(char const *,char const *)" (?stbi__fopen@@YAPAU_iobuf@@PBD0@Z)
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol __imp__fopen referenced in function "private: bool __thiscall sf::priv::ImageLoader::writeJpg(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<unsigned char,class std::allocator<unsigned char> > const &,unsigned int,unsigned int)" (?writeJpg@ImageLoader@priv@sf@@AAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$vector@EV?$allocator@E@std@@@5@II@Z)
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol __imp__fread referenced in function "void __cdecl stbi__start_callbacks(struct stbi__context *,struct stbi_io_callbacks *,void *)" (?stbi__start_callbacks@@YAXPAUstbi__context@@PAUstbi_io_callbacks@@PAX@Z)
sfml-graphics-s-d.lib(ImageLoader.cpp.obj) : error LNK2019: unresolved external symbol __imp__strncmp referenced in function "float * __cdecl stbi__hdr_load(struct stbi__context *,int *,int *,int *,int)" (?stbi__hdr_load@@YAPAMPAUstbi__context@@PAH11H@Z)
sfml-window-s-d.lib(GlContext.cpp.obj) : error LNK2019: unresolved external symbol __imp__strstr referenced in function "private: void __thiscall sf::priv::GlContext::initialize(struct sf::ContextSettings const &)" (?initialize@GlContext@priv@sf@@AAEXABUContextSettings@3@@Z)
MSVCRTD.lib(_chandler4gs_.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4
W:\VS Projects\SFML\Debug\SFML-NoConsole.exe : fatal error LNK1120: 8 unresolved externals
 

And here is a pastebin of the compiler output
« Last Edit: May 21, 2017, 10:51:34 am by JamesYeoman »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10989
    • View Profile
    • development blog
    • Email
Re: Compile error LNK2038 when statically linking
« Reply #1 on: May 20, 2017, 09:18:33 pm »
So what's the error?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

JamesYeoman

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Compile error LNK2038 when statically linking
« Reply #2 on: May 21, 2017, 10:45:02 am »
I had assumed in the title that LNK2038 was specific but I was wrong about that. My bad...

The values for <name>, <value> and <value 2> are "RuntimeLibrary", "MDd_DynamicDebug" and "MTd_StaticDebug" respectively.

If the " <name>, <value> and <value 2> " parts don't make any sense, I am talking about The MSDN definition of LNK2038

I am also about to edit the original post to include a pastebin of the compiler output incase it still doesn't make any sense. I will be away from 10:00 AM to 5:00 PM UK time so I will check back at 5.

I will also have my mobile with me while I am out so if I do get an email notifying of a response and it requires immediate attention (because I will check the responses whenever I recieve an email), I will respond but it won't be formatted very well because... you know, mobiles.

I hope this does help and that my issue does get resolved because I am starting to crave some SFML :D

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10989
    • View Profile
    • development blog
    • Email
Re: Compile error LNK2038 when statically linking
« Reply #3 on: May 21, 2017, 12:08:56 pm »
The LNK error number is generally useful, but much more useful is always the full error as it clearly tells you what the issue is. Plus it's kind of annoying when you first have to ask MSDN what the error code means. ;)

You've set the /MT or /MTd flag for the runtime libs while SFML was built with /MD or /MDd.

Either change your project settings to /MD or /MDd, or build SFML from source and make sure to check SFML_STATIC_STD_LIBS.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

JamesYeoman

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Compile error LNK2038 when statically linking
« Reply #4 on: May 21, 2017, 07:24:37 pm »
The LNK error number is generally useful, but much more useful is always the full error as it clearly tells you what the issue is. Plus it's kind of annoying when you first have to ask MSDN what the error code means. ;)

You've set the /MT or /MTd flag for the runtime libs while SFML was built with /MD or /MDd.

Either change your project settings to /MD or /MDd, or build SFML from source and make sure to check SFML_STATIC_STD_LIBS.

Thanks for the reply. Looks like I will be building from source then.  :'(

The website should be updated to state that the precompiled binaries provided for download aren't capable of static linking. It could have saved me a lot of time but...  :-\
« Last Edit: May 21, 2017, 07:27:24 pm by JamesYeoman »