0

我在 Macbook、OS X 10.6.4 上运行。我已经安装了最新版本的 libusb 1.x 和 libusb-compat。libusb 中的示例应用程序编译并运行,没有问题,所以我假设它安装正确。Libftdi 似乎也可以正确安装,但似乎与 libusb 有问题。我尝试了其中一个示例应用程序,但收到以下错误消息:

$ ./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

Trace/BPT trap

libusb 应该受到责备的假设是因为 _usb_init 是一个 libusb 函数,我在这里找到了一个与此内容相同的帖子http://www.jedi.be/blog/2009/11/11/ruby-usb-libusb/但对于红宝石。

试图让 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

请注意,要使用 Pyftdi 运行任何东西,我必须默认安装 libftdi for i386 而不是 x86_64(抛出 mach-o 错误) - 但是,即使“正常”安装 libftdi 也会出现上述 OSErrors。任何建议将不胜感激。

4

1 回答 1

0

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

于 2011-06-14T20:19:56.753 回答