From 54cb50c3d458721fad3de028b1f7eee16705329d Mon Sep 17 00:00:00 2001 From: Sundaram Ramaswamy Date: Wed, 28 Feb 2024 09:52:24 +0530 Subject: [PATCH] Fix linker errors in OGL configurations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Building with Visual Studio 2022 gives linker errors for OGL configs ``` 1>glfw3.lib(init.c.obj) : error LNK2019: unresolved external symbol __imp__vsnprintf referenced in function __glfwInputError 1>MSVCRT.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol __imp__vsnprintf 1>glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp__sscanf referenced in function _parseVersionString 1>MSVCRT.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol __imp___vsnprintf ``` Visual Studio 2015’s breaking changes [1] moved these to `legacy_stdio_definitions.lib`. Fix by adding this library as a dependency to IvGraphics project. --- src/common/IvGraphics/IvGraphics.vcxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/IvGraphics/IvGraphics.vcxproj b/src/common/IvGraphics/IvGraphics.vcxproj index 4d9144c..2e1ddb4 100644 --- a/src/common/IvGraphics/IvGraphics.vcxproj +++ b/src/common/IvGraphics/IvGraphics.vcxproj @@ -109,6 +109,7 @@ ..\Libs\OGLRelease\IvGraphics.lib true + legacy_stdio_definitions.lib true @@ -145,6 +146,7 @@ copy .\OGL\Iv*.h ..\Includes\OGL ..\Libs\OGLDebug\IvGraphics.lib true + legacy_stdio_definitions.lib true