Find the answer to your Linux question:
Results 1 to 2 of 2
Hello everybody! I am writing simple USB device driver built on libusb library. I've installed it into /usr/local/lib directory and tried to add the /usr/local/lib directory to library paths in ...
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Posts
    26

    linking libusb in eclipse

    Hello everybody!
    I am writing simple USB device driver built on libusb library. I've installed it into /usr/local/lib directory and tried to add the /usr/local/lib directory to library paths in project properties, but eclipse still can't find methods such as: usb_init(), usb_find_busses, usb_find_devices from libusb API.
    Thank's for answers, Vita

  2. #2
    Linux User
    Join Date
    Jul 2004
    Location
    Poland
    Posts
    368
    I don't program in Eclipse a lot (no at all to be frank ), but it seems to me that adding a library path is not sufficient. What you need to do more is to tell it to actually link against the libusb library. Pass a -lusb option to the linker. If you were under console you'd type something resembling:
    gcc -o myprogram myprogram.c -L/usr/local/lib -lusb
    "I don't know what I'm running from
    And I don't know where I'm running to
    There's something deep and strange inside of me I see"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...