-
Notifications
You must be signed in to change notification settings - Fork 474
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
Conflicting declaration of windows_error_str with libusb #269
Comments
I'm afraid that, since both projects are Open Source, I consider that if you plan to create a libusb + libwdi executable, you will have no issues renaming one of these instances for your project. Very, very few people are developing projects that link libwdi and libusb in the same executable, so, right now, I'm not planning to spend any time to address a very corner case, sorry. |
Sure, this is what I did locally. Would you accept a PR that fixes this by renaming the function? BTW since I'm a beginner in this world, would you explicitly suggest against linking both libwdi and libusb in the same executable for technical reasons? Or is it just something that is not common but there are not technical issues in doing it? |
A PR should be okay. And yes, a I don't explicitly suggest against linking both libraries, it's just that you usually want to keep the driver installer and the application separated, therefore very few people are expected to want to combine both libraries. |
Thanks for the clarification. I will prepare the PR after testing. |
Appreciated. Thanks! |
Hello, it looks like both libwdi and libusb define a function with the same name (
windows_error_str
):https://github.com/libusb/libusb/blob/c060e9ce30ac2e3ffb49d94209c4dae77b6642f7/libusb/os/windows_common.c#L48
libwdi/libwdi/libwdi.c
Line 319 in c0c4664
This means that it seems not possible to create a single binary that both links libwdi and libusb, because the linker will complain that there are multiple definitions of that symbol.
It seems that, in both cases, the symbol is actually not meant to be exported, but just referenced internally across different files. Maybe it should renamed with a prefix to avoid the clash (eg:
wdi_windows_error_str
).The text was updated successfully, but these errors were encountered: