开发者

Problems with libftdi and libusb

I'm running on a Macbook, OS X 10.6.4. I've installed the latest version of libusb 1.x and also libusb-compat. The example applications in libusb compile and run, no problems there so I am assuming that it's installed correctly. Libftdi also appears to install correctly, but it seems to be having trouble with libusb. I tried one of the example apps and I get this error message:

$ ./simple
dyld: lazy symbol binding failed: Symbol not found: _usb_init
  Referenced from: /Users/Me/Downloads/libftdi-0.19/src/.libs/libftdi.1.dylib
  Expected in: flat namespace

dyld: Symbol not found: _usb_init
  Referenced from: /Users/Me/Downloads/libftdi-0.19/src/.libs/libftdi.1.dylib
  Expected in: flat namespace

T开发者_StackOverflow中文版race/BPT trap

The assumption that libusb is to blame is because _usb_init is a libusb function, I found a post here that was along the same lines http://www.jedi.be/blog/2009/11/11/ruby-usb-libusb/ but for Ruby.

Trying to get things going with Pylibftdi,

Traceback (most recent call last):
  File "blah/list_devices.py", line 4, in <module>
    for device in Driver().list_devices():
  File "/Library/Python/2.6/site-packages/pylibftdi/driver.py", line 61, in __init__
    fdll = CDLL(ftdi_lib)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/__init__.py", line 345, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/usr/local/lib/libftdi.dylib, 6): Symbol not found: _usb_bulk_read
  Referenced from: /usr/local/lib/libftdi.dylib
  Expected in: flat namespace
 in /usr/local/lib/libftdi.dylib

Note that to get anything to even run using Pyftdi I had to install libftdi for i386 rather than x86_64 as default (throws up mach-o errors) - however, even installing libftdi 'normally' gives the OSErrors above. Any suggestions would be greatly appreciated.


I believe with libftdi 0.19 you're supposed to use libusb 0.1 (atleast according to thier web page. http://www.intra2net.com/en/developer/libftdi/download.php). There's a port of libftdi out there to use libusb 1.0 if you want. I've been using it for SYNC and ASYNC Fifos and its been working great.

http://developer.intra2net.com/git/?p=libftdi-1.0

git://developer.intra2net.com/libftdi-1.0

Good luck

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜