Conversation
mflatt
added a commit
to mflatt/racket
that referenced
this pull request
Sep 26, 2026
The advice to use `cairo` instead of `libcairo` is not enough, yet, but that advice will become right if we change DLL loading on Windows (possibly via racket#5591). Meanwhile, document rendering will not crash.
mflatt
added a commit
that referenced
this pull request
Sep 26, 2026
The advice to use `cairo` instead of `libcairo` is not enough, yet, but that advice will become right if we change DLL loading on Windows (possibly via #5591). Meanwhile, document rendering will not crash.
Along lines suggested by @ndykman, change DLL loading to look for dependencies alongside a loaded DLL, insead of looking in the executable directory (while other parts of the search path are unchanged). This is a change from previous behavior, but seems more likely to solve problems than create them. For example, the `ffi2` example can work on Windows with only small changes.
mflatt
force-pushed
the
load-library-ex
branch
from
September 27, 2026 02:57
410c2e8 to
a6fcf35
Compare
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.
Along lines suggested by @ndykman, change DLL loading to look for dependencies alongside a loaded DLL, instead of looking in the executable directory (while other parts of the search path are unchanged).
This is a more conservative change than the suggested one, but I think it gets at the main goal in a way that's directly provided by the OS. It's still a change from Racket's previous behavior, but the limited change seems more likely to solve problems than create them. For example, the
ffi2documentation's example can work on Windows with only small changes.Note that
ffi-libwill still find an immediately requested DLL adjacent to the executable, since the executable serves as the relevant module in that case. The difference is in looking for dependencies of a DLL. If dependencies are meant to be found adjacent to the executable, there's a good change that the immediately requested DLL was there, too, and it's no change in that case.