Skip to content

windows: Have a separate definition flag for export#515

Merged
Youw merged 1 commit intomasterfrom
dev-win-static
Mar 13, 2023
Merged

windows: Have a separate definition flag for export#515
Youw merged 1 commit intomasterfrom
dev-win-static

Conversation

@Youw
Copy link
Copy Markdown
Member

@Youw Youw commented Mar 12, 2023

On some compilers an empty definition (e.g. -DHID_API_EXPORT) means the same as =1 (e.g. -DHID_API_EXPORT=1), but the HID_API_EXPORT macro should be empty in static library build case.

Having a separate compiler definition flag solves that issue.

Closes: #512
Relates: #480

On some compilers an empty definition (e.g. -DHID_API_EXPORT)
means the same as =1 (e.g. -DHID_API_EXPORT=1), but the HID_API_EXPORT macro should be
empty in static library build case.

Having a separate compiler definition flag solves that issue.
@Youw
Copy link
Copy Markdown
Member Author

Youw commented Mar 12, 2023

@SamuelC0507 this should fix the issue you've faced.

@mcuee mcuee added Windows Related to Windows backend Core Related to common codes like hidapi.h labels Mar 12, 2023
@Youw Youw changed the title win: Have a separate definition flag for export windows: Have a separate definition flag for export Mar 12, 2023
@SamuelC0507
Copy link
Copy Markdown

@SamuelC0507 this should fix the issue you've faced.

Just tried it and yes indeed it does, thanks!

@Youw Youw merged commit fc3eed3 into master Mar 13, 2023
@Youw Youw deleted the dev-win-static branch March 13, 2023 10:11
fengjixuchui added a commit to fengjixuchui/hidapi that referenced this pull request Mar 13, 2023
windows: Have a separate definition flag for export (libusb#515)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core Related to common codes like hidapi.h Windows Related to Windows backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants