Skip to content

hidapi-libusb: hid_open fails when run with non-root access (*sometimes) #539

Closed Answered by treykazee
treykazee asked this question in Q&A
Discussion options

You must be logged in to vote

Maybe you're linking both libraries somehow and the linker (surprisingly) doesn't take it as an ODR violation, but instead optimizes one library out.

I think you are correct. I understand now what is happening, and thank you very much for your help!

It looks like in the new module my coworker added support for an additional device which is built by another company; in doing so, he linked their device's API library. It seems that their API library defines all of the hid_* calls (hid_init, hid_enumerate, hid_open, etc) - so even though I thought I was explicitly linking against hidapi-libusb, the linker was resolving my hid_* calls using their library. I did not anticipate they included i…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@treykazee
Comment options

@Youw
Comment options

@Youw
Comment options

@treykazee
Comment options

Answer selected by treykazee
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants