Skip to content

Fix shared/static lib build conflict #630

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

Merged
merged 3 commits into from
Jul 16, 2017

Conversation

jschueller
Copy link
Contributor

@jschueller jschueller commented Jul 1, 2017

When both static and shared lib build are enabled, there is a conflict between the static and import lib ; both are named jsoncpp.lib and the test was incorrectly linked to the static lib but built with JSON_DLL flag and so failed to import symbols with the dllimport keyword. We propose to fix this by appending a "_static" suffix to the static lib when the shared lib is also enabled, so as by default (shared=0, static=1) the behavior is still the same.
This fixes #631.

Also, the appveyor script was messy and mixed msvc versions and 32/64 bits configurations.

@cdunn2001
Copy link
Contributor

appveyor build failed.

@jschueller jschueller force-pushed the appveyor branch 9 times, most recently from 9808a18 to b14b198 Compare July 12, 2017 15:14
@jschueller jschueller changed the title Enable shared libs Fix shared/static lib build conflict Jul 13, 2017
@cdunn2001 cdunn2001 merged commit f26edb0 into open-source-parsers:master Jul 16, 2017
@cdunn2001
Copy link
Contributor

Thanks for the appveyor changes!

@jschueller jschueller deleted the appveyor branch July 17, 2017 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fails to build with shared libs enabled on msvc
2 participants