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

windows: Have a separate definition flag for export #515

Merged
merged 1 commit into from
Mar 13, 2023
Merged

Conversation

Youw
Copy link
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
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

@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