Skip to content

Fix Windows build: static CRT for vendored libjxl and .exe binary suffix#279

Merged
fasterthanlime merged 2 commits into
mainfrom
windows-build-fixes
Jun 28, 2026
Merged

Fix Windows build: static CRT for vendored libjxl and .exe binary suffix#279
fasterthanlime merged 2 commits into
mainfrom
windows-build-fixes

Conversation

@fasterthanlime

@fasterthanlime fasterthanlime commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

jpegxl-src hardcodes CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded (static /MT) for libjxl on Windows MSVC, so the rest of the build must also use the static CRT or linking fails with LNK2038 RuntimeLibrary mismatches against dynamically-linked C deps (woff2/woofwoof, libwebp, etc.). Enable crt-static for x86_64-pc-windows-msvc.

Also resolve the ddc binary name with std::env::consts::EXE_SUFFIX in the install and integration-test paths so they find ddc.exe on Windows instead of a bare ddc.

jpegxl-src hardcodes CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded (static /MT)
for libjxl on Windows MSVC, so the rest of the build must also use the
static CRT or linking fails with LNK2038 RuntimeLibrary mismatches against
dynamically-linked C deps (woff2/woofwoof, libwebp, etc.). Enable
crt-static for x86_64-pc-windows-msvc.

Also resolve the ddc binary name with std::env::consts::EXE_SUFFIX in the
install and integration-test paths so they find ddc.exe on Windows instead
of a bare ddc.
@fasterthanlime fasterthanlime merged commit 5f9e940 into main Jun 28, 2026
12 checks passed
@fasterthanlime fasterthanlime deleted the windows-build-fixes branch June 28, 2026 13:34
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.

1 participant