Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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