-
Notifications
You must be signed in to change notification settings - Fork 133
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
Error when building both static and shared libs on Windows with MSVC #454
Comments
Hi @adriendelsalle, yes this is a known issue. A fix is currently in development. It is similar to your PR #455, but with an option for the user to control what is done. We would appreciate it if you could test the fix out when it is ready. |
Sure! Could you share a link when ready for testing? Thanks for the quick reply :) |
I also noticed that the In the following code, sundials/src/sundials/CMakeLists.txt Lines 159 to 164 in b685654
causing
but
and
Causing the I think |
#455) Description --- Disambiguate shared and static libs `.lib` files on Windows using MSVC Suffix library output name with `_static` when building both static and shared libs on Windows Closes #454 --------- Co-authored-by: Markus Mützel <[email protected]> Co-authored-by: Cody Balos <[email protected]>
Closed by #455. |
#455) Description --- Disambiguate shared and static libs `.lib` files on Windows using MSVC Suffix library output name with `_static` when building both static and shared libs on Windows Closes #454 --------- Co-authored-by: Markus Mützel <[email protected]> Co-authored-by: Cody Balos <[email protected]>
Description
It's currently not possible to build both static and shared versions of libraries on Windows when using the MSVC-based toolchain because both variants produce a
.lib
file with the exact same output name.For the shared libs it represents the export file and for static libs, the library itself.
It would be nice to detect such cases and automatically suffix the output name of the static lib with
_static
to disambiguate. It is also well documented in aconda-forge
enhancement proposal.I'll open a PR to discuss a possible fix!
Steps to reproduce
I'm building the project using a conda environment:
Then you get at the last step:
The text was updated successfully, but these errors were encountered: