Skip to content

Commit bed6563

Browse files
committed
Win7 compatibility fix: "The procedure entry point CreateFile2 could not be located in the dynamic link library KERNEL32.dll" that was brought on by VS2026 compiler
VS2026's newer SDK became more aggressive about detecting and defaulting to UWP-compatible API usage, even when targeting older Windows versions.. now we will need to explicitly declare Windows API family, not just target OS version.
1 parent 8e4c2b7 commit bed6563

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

vendor/freetype/premake5.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ project "freetype"
55
targetname "freetype"
66

77
includedirs { "include", "src", }
8-
defines { "FT2_BUILD_LIBRARY=1", "_UNICODE", "UNICODE", "_LIB" }
8+
defines { "FT2_BUILD_LIBRARY=1", "_UNICODE", "UNICODE", "_LIB", "WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP", "IOWIN32_USING_WINRT_API=0" }
99
removedefines { "DEBUG" }
1010

1111
files {

vendor/zip/premake5.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ project "zip"
44
targetname "zip"
55

66
includedirs { "../zlib" }
7+
defines { "WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP", "IOWIN32_USING_WINRT_API=0" }
78

89
vpaths {
910
["Headers/*"] = "**.h",

0 commit comments

Comments
 (0)