How can I force gcc/ld to go ahead and link a (partially) usable executable despite a missing shared library (and associated missing symbols)?
Context: I have a hardware driver that is distributed only as a 32 bit ELF binary blob (libEposCmd.so). It depends on a library (libftd2xx.so) that I know from context is not actually used (the ftdi stuff is for usb-serial adapters, which I'm not using).
gcc main.o -o epos_server -m32 -L/usr/lib32 -L/usr/local/lib32 -lEposCmd
/usr/bin/ld: warning: libftd2xx.so.0, needed by /usr/local/lib32/libEposCmd.so, not found (try using -rp
ath or -rpath-link)
main.o: In function `main':
/usr/local/lib32/libEposCmd.so: undefined reference to `FT_Write'
/usr/local/lib32/libEposCmd.so: undefined reference to `FT_SetDataCharacteristics'
/usr/local/lib32/libEposCmd.so: undefined reference to `FT_GetDeviceInfoDetail'
/usr/local/lib32/libEposCmd.so: undefined reference to `FT_SetFlowControl'
...
My only undefined references are FT_*, which I am fairly certain all belong to libftd2xx.
Ugly hacks are acceptable; this is research code and we hope to replace this hardware (maxon epos2 motor driver) with something with better linux support ASAP.
Update: The .so is ~not stripped, so it should be possible to extract prototypes for the missing functions...