Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Detect missing DLL dependencies and list them in the open_dynamic_library error message. #75383

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Mar 27, 2023

When loading DLLs, Windows do not give any information which file is missing (it's always Error 126: The specified module could not be found.). This is a constant issue for GDExtension users (a module can be broken, or miss a dependency DLL or dependency of a dependency, it is hard to determine what's wrong without using external tools like Dependency Walker).

This PR adds a readable list of missing modules to the open_dynamic_library error message by recursively reading import tables of DLLs (in debug build only and if DLL loading failed).

Related issues:
godotengine/godot-cpp#976
godotengine/godot-cpp#1064

Screenshot 2023-03-27 113510

@akien-mga akien-mga modified the milestones: 4.x, 4.1 Apr 18, 2023
@akien-mga akien-mga merged commit efa01d3 into godotengine:master Apr 18, 2023
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants