How to link dylib file in C++ builder project

565 views Asked by At

I am using Embarcadero C++Builder 10.1 Berlin Update 2 on Windows 7 32-bit, connected to a MacBook running with macOS Sierra (v10.12.1).

I am trying to write a Mac OSX app that reads data from an FTDI device using D2XX method (FTDI API).

I include FTD2xx.h in my code, and it compiles successfully. But it fails on the link stage:

[FIXME Error] Error: Unresolved external '_FT_CreateDeviceInfoList' referenced from D:\PROJECT_SRC\OSX32\DEBUG\DEVICEQUERY.O

I should link to libftd2xx.dylib but I don't know how.

I tried to add the dylib path to "Library paths" in the "Edit SDK" dialog, but that didn't work.

Any idea?

2

There are 2 answers

1
0x9093717 On

if you haven't included .h before your first compilation, you probably need to clean directory with object files, /debug folder, delete existing builds and then try to rebuild and show what's happening, ofc if you didnt try this before, or I've read badly.

0
Cruise Hung On

I added dylib file directly to C++ Builder project by selecting the filter to "All files" and it works now!