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

distinguish library name for static build on MSVC #57

Closed
wants to merge 1 commit into from

Conversation

djsutherland
Copy link

On Windows, whether you build with BUILD_SHARED_LIBS or not, the library is still named snappy.lib. This is confusing compared to the Unix case, where it's libsnappy.a for static libs and libsnappy.so or libsnappy.dylib for dynamic libraries, and makes it impossible to install both a static and a dynamic lib at the same time.

This patch names the static library snappy_static.lib on Windows to avoid that.

It's maybe a little bit weird to have the default behavior not produce something named snappy.lib, but snappy_static.lib is the name that we've already shipped with in conda-forge for what that's worth.

@Optiligence
Copy link

It’s also possible to rename the dll import lib using IMPORT_SUFFIX to avoid different names for the actual libraries.

PS: It’s a little confusing to read windows when only msvc is affected.

@djsutherland djsutherland changed the title distinguish library name for static build on windows distinguish library name for static build on MSVC Sep 11, 2017
@djsutherland
Copy link
Author

@Optiligence What would a typical project set IMPORT_SUFFIX to?

@Optiligence
Copy link

Optiligence commented Sep 11, 2017

idk, I would set it to _imp, or .imp if you want to be fancy (that could create its own problems tho).

@cmumford
Copy link
Contributor

@googlebot rescan

@pwnall
Copy link
Member

pwnall commented Jan 12, 2022

Thank you for your contribution!

We're not currently interested in contributions to the build configuration. We now have a paragraph explaining the situation in https://github.com/google/snappy/blob/master/README.md#contributing-to-the-snappy-project

@pwnall pwnall closed this Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants