fix(windows): fix MSVC shared library CRT linking in libghostty-vt#13151
Open
eunos-1128 wants to merge 3 commits into
Open
fix(windows): fix MSVC shared library CRT linking in libghostty-vt#13151eunos-1128 wants to merge 3 commits into
eunos-1128 wants to merge 3 commits into
Conversation
Contributor
|
Hi @eunos-1128, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md for more details. |
Clarified comments regarding Windows DLL requirements and CRT library linking.
Member
|
Vouched manually in #13166 |
This comment has been minimized.
This comment has been minimized.
mitchellh
approved these changes
Jul 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Building
libghostty-vtas a shared library on Windows with MSVC fails becauselinkLibC()only links
msvcrt.lib, while shared DLL builds also requirevcruntime.libanducrt.lib.This blocks downstream projects (e.g.,
herdr) from building against libghostty-vt on Windows.Solution
Explicitly link the full MSVC CRT chain for shared library builds:
libvcruntimelibucrtChanges
Modified
src/build/GhosttyLibVt.zigto:This change aligns with an existing fix in
GhosttyLib.zig.Verification
✅ Build succeeds on Windows with MSVC
Related
Addresses the Windows/MSVC build issue encountered when packaging
herdrfor conda-forge:conda-forge/staged-recipes#34029