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

‘libusb_set_debug’ is deprecated ERROR #21

Open
tjthejuggler opened this issue Oct 24, 2022 · 0 comments
Open

‘libusb_set_debug’ is deprecated ERROR #21

tjthejuggler opened this issue Oct 24, 2022 · 0 comments

Comments

@tjthejuggler
Copy link

tjthejuggler commented Oct 24, 2022

I am completely new to golang, so this is probably my fault.

I did 'go mod init antdump' in /cmd/antdump, and then I did go get commands for all the modules

Then it gave me a libusb error. So, following advice online I ran 'sudo apt-get install libusb-1.0-0-dev'

And now, when I run this:
~/projects/antgo/cmd/antdump$ go run antdump.go -driver=usb -pid=0x1008 -ws="ws://localhost:8080"

I get this:
github.com/kylelemons/gousb/usb
cgo-gcc-prolog: In function ‘_cgo_f568adb1d92f_Cfunc_libusb_set_debug’:
cgo-gcc-prolog:505:2: warning: ‘libusb_set_debug’ is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations]
In file included from ../../../../go/pkg/mod/github.com/kylelemons/gousb@v0.0.0-20170613091925-99e7ca4f0173/usb/libusb.go:27:
/usr/include/libusb-1.0/libusb.h:1362:18: note: declared here
1362 | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
| ^~~~~~~~~~~~~~~~
2022/10/24 16:12:59 Starting Device
2022/10/24 16:12:59 Opening USB device
2022/10/24 16:12:59 Loop Started
2022/10/24 16:12:59 Loop stopped!
2022/10/24 16:12:59 Closing USB device
2022/10/24 16:13:46 handle_events: error: libusb: interrupted [code -10]

Any ideas?

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

1 participant