Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[compatibility] LIBUSBX_API_VERSION undef #782

@goog

Description

@goog
build on ubuntu12.04

cheng@ubuntu:~/stlink$ pkg-config --libs --cflags libusb-1.0
-I/usr/include/libusb-1.0 -lusb-1.0

/home/cheng/stlink/src/sg.c: In function ‘stlink_open’:
/home/cheng/stlink/src/sg.c:969:5: error: "LIBUSBX_API_VERSION" is not defined [-Werror=undef]
cc1: all warnings being treated as errors

I make it pass by this

#define LIBUSB_API_VERSION 0x01000105
#define LIBUSBX_API_VERSION LIBUSB_API_VERSION 
#if LIBUSBX_API_VERSION < 0x01000106
    libusb_set_debug(slsg->libusb_ctx, 3);

but i dont know is it the right method for me.

Metadata

Metadata

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions