Skip to content

Static data members in LIBZIM_API and/or LIBZIM_PRIVATE_API classes result in linker errors under Windows CI #985

@veloman-yunkan

Description

@veloman-yunkan

Examples:

The problem seems to be caused by the improper definition of the LIBZIM_API and LIBZIM_PRIVATE_API macros.

  1. When building a DLL they need to be defined as __declspec(dllexport)
  2. However when compiling client code to be linked with a DLL they must be set to __declspec(dllimport)

See https://learn.microsoft.com/en-us/cpp/build/importing-into-an-application-using-declspec-dllimport?view=msvc-170

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions