Disabled forced Windows import library suffix, if static library is not built#16324
Disabled forced Windows import library suffix, if static library is not built#16324RubisetCie wants to merge 2 commits intocurl:masterfrom RubisetCie:import-suffix-fix
Conversation
|
Can you show an example CMake configuration where you experienced this and the expected vs actual result? (and also your C compiler vendor/version) edit: without those, my initial thought was that you wanted to set In the latter case, both shared and static libcurl are built, thus the suffix is required (for MSVC), and this setting tells to build To disable building the shared lib, I suggest trying the first option: |
|
Thank you for the reply. In my case, I'm on Windows, and using On MSVC, it will output two files:
That's good and all, but I want to get rid of the "_imp" suffix on the .lib. My pull request aims to fix that; since the only ".lib" file I'm building is the import library, there shouldn't be any confusion. I hope you understand my issue better... |
|
Thanks for explaining! You're right. I confused behaviour with libssh2, which does what I described. The reason it works that way in curl is compatibility with how it worked It'd be arguably better to only add a suffix if both shared and static are built, Then a search https://github.com/search?q=libcurl_imp&type=code convinced Question how to fix this while keeping everyone happy? Using Accepting an override via |
|
Analysis of PR #16324 at 53394db7: Test 2070 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Test 1631 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Test 363 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Generated by Testclutch |
|
Proposal to allow overriding suffixes at will, with detection |
|
Thanks for your report/PR, merged #16332 to fix this. |
…etection Allow overriding the `IMPORT_LIB_SUFFIX` default with an empty value. Also: - add a fatal error if the implib and static lib filename are identical. - clarify `IMPORT_LIB_SUFFIX` default value in the documentation. Reported-by: RubisetCie on Github Fixes curl#16324 Ref: 1199308 curl#11505 Closes curl#16332
Hello everyone.
A short problem I have at my job, we wish to build a shared version of the curl library from source, but on Windows, the "_imp" mandatory library suffix was a problem.
As this suffix is not needed when only the shared version is built and not the static version, this simple change should have no other impact.