2015-05-11 119 views
0

我想FTDI芯片ID擺脫在Mac OS約塞米蒂

http://www.ftdichip.com/Support/SoftwareExamples/FTDIChip-ID.htm

的Mac OS上運行示例應用程序。

我的問題是讓它爲Mac OS優勝美地編譯。

我得到這個錯誤 「製造」 之後:

 
ld: warning: ignoring file ./libftchipid.dylib, missing required architecture x86_64 in file ./libftchipid.dylib (2 slices) 
Undefined symbols for architecture x86_64: 
    "_FTID_Constructor", referenced from: 
     _main in ChipID-3efebc.o 
    "_FTID_Destructor", referenced from: 
     _main in ChipID-3efebc.o 
    "_FTID_GetChipIDFromHandle", referenced from: 
     _main in ChipID-3efebc.o 
    "_FTID_GetDeviceChipID", referenced from: 
     _main in ChipID-3efebc.o 
    "_FTID_GetDeviceDescription", referenced from: 
     _main in ChipID-3efebc.o 
    "_FTID_GetDeviceSerialNumber", referenced from: 
     _main in ChipID-3efebc.o 
    "_FTID_GetDllVersion", referenced from: 
     _main in ChipID-3efebc.o 
    "_FTID_GetErrorCodeString", referenced from: 
     _main in ChipID-3efebc.o 
    "_FTID_GetNumDevices", referenced from: 
     _main in ChipID-3efebc.o 
ld: symbol(s) not found for architecture x86_64 

有人可以幫忙嗎?

+0

你確定你的./libftchipid.dylib文件是x86_64的版本? – Richard

+0

它創建於2006年,所以我不認爲它是。但FTDI不提供用於獲取USB ID的任何其他OSX庫。 –

回答

0

我已經找到了如何在沒有這個庫的情況下讀取ID的方法。它被寫入EEPROM。

FT_ReadEE (ftHandle, 0x43, &wTemp) (FT_ReadEE (ftHandle, 0x44, &wTemp)

+0

對於不同的平臺(Raspberry),同樣的問題,我想補充一點,儘管ID存儲在0x43和0x44字中,與FTDI工具中可見的對應關係存在一些(非平凡)位操作要求:見https://vyvoj.hw.cz/navrh-obvodu/je-skutecne-ftdichip-id-v-ft232r-unikatni.html(不是英文版,但源代碼非常清晰) – lbenini