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

How to use it with rust-msvc? #8

Open
Boscop opened this issue Nov 2, 2017 · 3 comments
Open

How to use it with rust-msvc? #8

Boscop opened this issue Nov 2, 2017 · 3 comments

Comments

@Boscop
Copy link

Boscop commented Nov 2, 2017

How to use it with rust-msvc?

D:\data\tmp\libusb-rs>cargo run --example list_devices
   Compiling libusb-sys v0.2.3
   Compiling kernel32-sys v0.2.2
error: failed to run custom build command for `libusb-sys v0.2.3`
process didn't exit successfully: `D:\data\tmp\libusb-rs\target\debug\build\libu
sb-sys-49cf5f1d794041ca\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "MSVC ta
rget detected. If you are using the MSVC ABI rust build, please use the GNU ABI
build instead."', src\libcore\result.rs:906:4
@Boscop
Copy link
Author

Boscop commented Nov 3, 2017

Is it possible to use these bindings with the dll?
https://sourceforge.net/projects/libusb-win32/

@dcuddeback
Copy link
Owner

@Boscop You've probably seen my comments from this morning on the other issues related to this topic. I've only ever built with MSYS2 on Windows. I posted the steps that work for me in #4, and there's a PR for a new build strategy that should work with MSVC: #5. I could use help testing #5, so if you try it, I'd appreciate some feedback on whether or not it works for you.

@Geobert
Copy link

Geobert commented Apr 25, 2018

I'm trying to make this PR work with no luck on linking:
dcuddeback/libusb-rs#17

seems that the remaining missing symbol is because of some differences on the visual studio version used to compile libusb?

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

No branches or pull requests

3 participants