On Fri, Sep 4, 2020 at 1:12 PM sergio <ser...@outerface.net> wrote: > > > % gcc -lusb usbtest.c > /usr/bin/ld: /tmp/cckKmWxL.o: in function `main': > usbtest.c:(.text+0x5): undefined reference to `usb_init' > collect2: error: ld returned 1 exit status > zsh: exit 1 gcc -lusb usbtest.c > % gcc usbtest.c -lusb > % > > Забавно, но это не у одного меня так:
https://stackoverflow.com/questions/45135/why-does-the-order-in-which-libraries-are-linked-sometimes-cause-errors-in-gcc