Skip to content

No linker option to ensure libusb is linked to appropriately #80

@shaydonb

Description

@shaydonb

Tried building the binary on an x86_64 Ubuntu laptop with:
Make 4.3, GCC 11.4.0

Found that libusb was not getting linked correctly. Added the following line to the Makefile to get it to work:

diff --git a/Makefile b/Makefile
index 139e5c0..9bac300 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@ CFLAGS += $(shell $(PKG_CONFIG) --cflags libusb-1.0)
 
 LDFLAGS ?=
 LDFLAGS += -lpthread
+LDFLAGS += -lusb-1.0
 LDFLAGS += $(shell $(PKG_CONFIG) --libs libusb-1.0)
 
 DEPDIR := .deps

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