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

build: Add SECP256K1_API_VAR to fix importing variables from DLLs #1209

Merged
merged 4 commits into from
Feb 21, 2023

Commits on Feb 6, 2023

  1. build: Add SECP256K1_API_VAR to fix importing variables from DLLs

    This fixes a build issue with MSVC. While MSVC imports *functions*
    from DLLs automatically when building a consumer of the DLL, it does
    not import *variables* automatically. In these cases, we need an
    explicit __declspec(dllimport).
    
    This commit simply changes our logic to what the libtool manual
    suggests, which has a very comprehensive writeup on the topic. Note
    that in particular, this solution is carefully designed not to break
    static linking. However, as described in the libtool manual,
    statically linking the library with MSVC will output warning LNK4217.
    This is still the best solution overall, because the warning is
    merely a cosmetic issue.
    real-or-random committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    914276e View commit details
    Browse the repository at this point in the history
  2. examples: Extend sig examples by call that uses static context

    Besides improving the examples, this makes sure that the examples
    import a variable (instead of a function), namely the static context,
    from the library. This is helpful when testing MSVC builds, because
    the MSVC linker tends to be awkward when importing variables.
    real-or-random committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    739c53b View commit details
    Browse the repository at this point in the history
  3. build: Suppress stupid MSVC linker warning

    ... and use correct format to pass linker flags
    real-or-random committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    9a5a611 View commit details
    Browse the repository at this point in the history
  4. ci: Shutdown wineserver whenever CI script exits

    Before: CI times out when a wine task fails.
    After:  Wine tasks exit properly when they fail.
    real-or-random committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    e433034 View commit details
    Browse the repository at this point in the history