Skip to content

[boost] fix link issue with boost_system when statically linked #197

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 1 commit into from
Dec 25, 2018

Conversation

matlo607
Copy link
Contributor

@matlo607 matlo607 commented Jul 3, 2018

On Windows, symbols related to boost::system are missing when using a static version of boost-system.
BOOST_ERROR_CODE_HEADER_ONLY must be defined because of this piece of code in boost/system/error_code.hpp.

#ifdef BOOST_ERROR_CODE_HEADER_ONLY
    inline const error_category &  system_category() BOOST_SYSTEM_NOEXCEPT;
    inline const error_category &  generic_category() BOOST_SYSTEM_NOEXCEPT;
#else
    BOOST_SYSTEM_DECL const error_category &  system_category() BOOST_SYSTEM_NOEXCEPT;
    BOOST_SYSTEM_DECL const error_category &  generic_category() BOOST_SYSTEM_NOEXCEPT;
#endif

If BOOST_ERROR_CODE_HEADER_ONLY is not defined, symbols of system_category() and generic_category() are prepended with __imp_ (due to BOOST_SYSTEM_DECL -> __declspec(dllimport)) and not found when linking against libcucumber-cpp.lib

@coveralls
Copy link

coveralls commented Jul 3, 2018

Coverage Status

Coverage remained the same at 62.814% when pulling 6db8b21 on matlo607:fix-link-boost-system into 79e92de on cucumber:master.

@matlo607 matlo607 force-pushed the fix-link-boost-system branch from f6b74a4 to 6db8b21 Compare July 16, 2018 10:37
@matlo607
Copy link
Contributor Author

@muggenhor, @konserw : please could somebody review this PR ?

@matlo607
Copy link
Contributor Author

Please could somebody review this PR ?
Is there anything blocking ?

@paoloambrosio paoloambrosio merged commit 6db8b21 into cucumber:master Dec 25, 2018
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.

3 participants