Skip to content

Replace .dll.a libusb libraries with .a #126

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

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Replace .dll.a libusb libraries with .a #126

merged 1 commit into from
Aug 30, 2024

Conversation

will-v-pi
Copy link
Contributor

On Windows, with the latest libusb-1.0.27 downloaded, the find_library command returns the .dll.a libraries, which refer to the dynamic .dll libraries in a separate folder. This means picotool compiles fine, but when run it throws an error that it can't find libusb-1.0.dll. It will only run if libusb-1.0.dll is in a location Windows searches for .dlls, such as the same directory as the executable, or in the path.

Fix this by replacing .dll.a with .a in the output from find_library - this links picotool against the static libusb-1.0.a library, so doesn't require any external files.

@will-v-pi will-v-pi added this to the 2.0.1 milestone Aug 29, 2024
@will-v-pi will-v-pi requested a review from kilograham August 29, 2024 14:08
@will-v-pi will-v-pi merged commit 9fa0857 into develop Aug 30, 2024
@will-v-pi will-v-pi deleted the no-dll-a branch August 30, 2024 14:33
will-v-pi added a commit that referenced this pull request Apr 15, 2025
Add `PICOTOOL_LIBUSB_ALLOW_DLL` variable to switch back to the old behaviour, prior to #126
will-v-pi added a commit that referenced this pull request Apr 15, 2025
Add `PICOTOOL_LIBUSB_ALLOW_DLL` variable to switch back to the old behaviour, prior to #126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants