Skip to content

‘libusb_set_debug’ is deprecated ERROR #21

@tjthejuggler

Description

@tjthejuggler

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions