Skip to content
Snippets Groups Projects

Fix glad compile issue under MSVC using /MT

Merged Jonathan Kunstwald requested to merge feature/fix-glad-msvc into develop

MSVC 15 introduced breaking changes to CRT binaries:

https://msdn.microsoft.com/en-us/library/bb531344.aspx#BK_CRT

In this case sscanf_s (used in glad.c, line 7699) from stdio.h has changed and causes a LNK2019 unresolved external symbol error if compiled using MSVC 15 or newer, and the /MT or /MTd flag (CMake variable USE_MSVC_RUNTIME_LIBRARY_DLL set to Off).

The issue is fixed by not including stdio.h on MSVC, and instead linking against legacy_stdio_definitions.lib.

Merge request reports

Merged by Philip TrettnerPhilip Trettner 6 years ago (Nov 11, 2018 8:40am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading