Open mcoughlin opened 9 years ago
This is a bug in the FLI SDK I think.
You want to replace the following in libfli.c
#ifdef _WIN32
long usb_bulktransfer(flidev_t dev, int ep, void *buf, long *len);
#else
long linux_bulktransfer(flidev_t dev, int ep, void *buf, long *len);
#define usb_bulktransfer linux_bulktransfer
#endif
with
#ifdef _WIN32
long usb_bulktransfer(flidev_t dev, int ep, void *buf, long *len);
#elif defined(__APPLE__)
long mac_bulktransfer(flidev_t dev, int ep, void *buf, long *len);
#define usb_bulktransfer mac_bulktransfer
#else
long linux_bulktransfer(flidev_t dev, int ep, void *buf, long *len);
#define usb_bulktransfer linux_bulktransfer
#endif
This is not the end of your concerns. Having fixed the above I am now having issues with duplicate symbols which I am yet to resolve
duplicate symbol _mac_fli_lock in:
libfli-sys.o
libfli-usb-sys.o
I am attempting to compile the shared library on a Mac (I have successfully compiled on SL7 and it works great!). To do so, I added the framework flags below to the $(CC) line:
libfli.so: libfli.o $(ALLOBJ) $(CC) -shared -o $@ $^ -framework Foundation -framework IOKit
I am still running into an error of:
gcc -shared -o libfli.so libfli.o libfli-sys.o libfli-debug.o libfli-mem.o libfli-usb.o libfli-usb-sys.o libfli-serial.o libfli-camera.o libfli-camera-parport.o libfli-camera-usb.o libfli-filter-focuser.o -framework Foundation -framework IOKit Undefined symbols for architecture x86_64: "_linux_bulktransfer", referenced from: _FLIUsbBulkIO in libfli.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *\ [libfli.so] Error 1
Any thoughts?