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
Fix the mingw-w64 dll name #998
Conversation
It should be the same name so mingw-w64 toolchains can generate/use the same DLLs as the MSVC toolchains. The DLL and import libraries are compatible both ways. Fixes KhronosGroup#997
The common name for import libraries in mingw-w64 ends with .dll.a so we need to use it so the pkg-config file ends up use -lvulkan-1.dll.
Author robUx4 not on autobuild list. Waiting for curator authorization before starting CI build. |
CI Vulkan-Loader build queued with queue ID 22836. |
CI Vulkan-Loader build # 1467 running. |
CI Vulkan-Loader build # 1467 passed. |
This is not the first time the name of the vulkan-loader library in mingw has been changed. And I would really like some sort of authority (aka, a mingw documentation page stating what the convention should be) before merging any further changes. #523 is the original PR that drops the lib prefix (afaik). #606 Reverts PR 523 by adding it back. Now this PR wants to drop it again. I'm just generally confused as to what the answer should be. |
Ah, I didn't know about this back and forth. It seems #523 did the proper thing which then broke unexpectedly with #595. #606 was an attempt to fix it but it did not go back to the #523 situation. I'm not sure there's a definitive authority for
Given that, the first clear thing is that the import library must match the Then there's the name of the import library. The Side note: it seems that |
I don't really have a stake in this, as I do not use mingw nor do we (lunarg) directly support it. I'm happy to take PR's, but well, the name of the file isn't something that should be changing every year. What confuses me is whether a mingw built application needs to 'build' the loader to use it (aka, the loader has to be built in a mingw environment to be useable for mingw apps), or if the mingw app can use the vulkan-1.dll in in Windows/System32. I can answer your question about |
A mingw app can use the loader directly. All it needs to link with it is to "compile" the .def (generate the import library). But since there's no target in the project for that we have to build the DLL. |
From your comments, it appears that I'm happy to accept this merge request, but do wonder why it was previously using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of mingw trying to be compatible with windows, it make sense that the dll name should be vulkan-1.dll
(libvulkan-1.dll is neither windows style nor linux style). I will accept and merge the PR.
If anyone disagree's with this change, they should open an issue or PR and include proper references & documentation as to why it should change.
Both MSVC and mingw-w64 should produce the same DLL name and their import libraries should target the same DLL as well.
Fixes #997