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

Single source file building #717

Closed
toxieainc opened this issue Feb 25, 2025 · 2 comments
Closed

Single source file building #717

toxieainc opened this issue Feb 25, 2025 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@toxieainc
Copy link
Contributor

Hi!

https://github.com/libusb/hidapi/blob/master/BUILD.md#embedding-hidapi-directly-into-your-source-tree mentions that including hidapi into a repo for compiling should work via copying a single file /hid.c .
I tried for windows, but from what i experienced, i needed to add all .h and .c files from the windows folder.
Am i missing something or is this documentation simply outdated?

Thanks!

@Youw
Copy link
Member

Youw commented Feb 25, 2025

mentions that including hidapi into a repo for compiling should work via copying a single file /hid.c

Unfortunately you've misread the documentation. In fact:

  1. you need to include a single source file into your project's build system
  2. NOTE: the above doesn't guarantee that having a copy of /hid.c and hidapi/hidapi.h is enough to build HIDAPI. The only guarantee that /hid.c includes all necessary sources to compile it as a single file.

@toxieainc
Copy link
Contributor Author

Ah, okay, yup i misinterpreted the doc then. Its a bit unusual, but okay, thanks..

@mcuee mcuee added the documentation Improvements or additions to documentation label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants