Skip to content

Conversation

@legends2k
Copy link

@legends2k legends2k commented Feb 28, 2024

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.

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.
@legends2k
Copy link
Author

Went with a simpler fix than bumping GLFW 3.1.1 to 3.4 (latest).

@DimenDie
Copy link

You're legend. Thank you so much for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants