Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Missing __declspec(dllimport) #3

@jcxz

Description

@jcxz

Hi,

header files from your SDK are missing __declspec(dllimport). Without it, the DLL does not work. For example global variables exported by the SDK are not properly initialized and can cause linking errors (when linking with the provided .lib file). You should define EXPORT_API like this EXPORT_API __declspec(dllimport) and not like this EXPORT_API __declspec(dllexport).

And in my opinion, you should use a different name for that macro. Something like HOLOPLAY_API would certainly do a better job, EXPORT_API is just too generic and could cause name clashes in the code of your clients.

And you should also consider adding extern keyword in front of all exported global variables. It is not strictly necessary when __declspec(dllimport) is used, but it is a good common practice. extern "C" block itself does not turn your global variable definitions into declarations (see https://stackoverflow.com/questions/21026264/extern-declaration-on-an-extern-c-global-variable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions