Skip to content

MSVC build with hidapi in-source fails with errors related to WINAPI #766

@k1-801

Description

@k1-801
Image

I am currently trying to build OpenRGB with HIDAPI built into the source (due to the need to ship the connection-callback branch specifically without it accidentally cross-linking to anything else). I added hidapi as a submodle specifically targeting that branch, though the specific error at hand is not related to that, but if I misconfigured the submodule - it could fail the build for you so pls let me know if that's the case.

The full project is located in here: https://gitlab.com/k1-801/OpenRGB/-/tree/hotplug_standalone . The project uses QMake build system, which is not very common, and I am using a MSVC 2019 compiler. I have included the hid.c files for each operating system into the project source list, as well as included the header folder in the includepath. I made no compiler flags changes for hidapi. The screenshot shows the errors I'm getting.

What could be causing this? How should I go about fixing this build.

My best guess currently is that it's WIN32_LEAN_AND_MEAN being defined globally, but I can't remove that define from the global list as it would break far too many parts of the code.

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