Comments (2)
Yes, Windows is different. See https://github.com/google/gousb#notes-for-installation-on-windows. I don't think we'll provide any more support for Windows above that - you need to already be familiar with building POSIX-compatible code on Windows. The instructions for building libusb on Windows are by no means specific to gousb.
from gousb.
thanks to https://github.com/libusb/libusb/issues/695
I managed to get this working on windows
For those stumbling across this issue the following worked for me
Windows 10 X64
- Install msys2
- run bash.exe
- install either 32 bit
pacman -S mingw-w64-i686-toolchain
or 64 bitpacman -Sy mingw-w64-x86_64-toolchain
- create
/mingw64/lib/pkgconfig/libusb-1.0.pc
(example below) - check version of libusb that installed
pacman -Q | grep libusb
$ mingw-w64-x86_64-libusb 1.0.23-1 - create directory
/mingw64/include/libusb-1.0
- download correct version of libusb.h and extract to
/mingw64/include/libusb-1.0/libusb.h
#lib-usb-1.0.pc
prefix=/mingw64
exec_prefix=${prefix}
libdir=${exec_prefix}/x86_64-w64-mingw32/lib
includedir=${prefix}/include
Name: libusb-1.0
Description: C API for USB device access from Linux, Mac OS X, Windows, OpenBSD/NetBSD and Solaris userspace
#update version to match
Version: 1.0.23
Libs: -L${libdir} -llibusb-1.0
Libs.private:
Cflags: -I${includedir}/libusb-1.0
from gousb.
Related Issues (20)
- Clear installation of Gosub on the Windows 10 - using msys64 HOT 3
- Latest package not picked up by go get HOT 9
- I can't open hp printer device with gousb HOT 5
- why connect printer return code -5? HOT 1
- Linux: How to get block devices list provided by usb stick? HOT 1
- incorrect device class HOT 2
- WinUSB drivers HOT 3
- libusb: bad access [code -3] HOT 8
- Windows: go build github.com/google/gousb: C:\Program Files\Go\pkg\tool\windows_amd64\cgo.exe: exit status 2 HOT 1
- Can't detach kernel driver. Invalid param [code -2] for iOS 16 devices HOT 5
- How to use in a Docker container without --privileged HOT 1
- CDC device HOT 5
- A lot of interrupted errors on MacOSX: handle_events: error: libusb: interrupted [code -10] HOT 8
- Failed to claim interface 0 HOT 1
- Errors on install; macos HOT 3
- Error when WriteContext is called HOT 10
- Device detach: libusb: error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access HOT 3
- Memory Leak in CGO part HOT 1
- Memory Leak HOT 4
- Android Support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gousb.