Multiple Definitions Compiling Error
Opened this issue · 0 comments
Getting a multiple definitions compile error, found this error had nothing to do with "-fcommon"/"-fnocommon" >=gcc-10 conversion.
First, find and install FTD linux drivers, I'm compiling on a 64bit platform:
libftd2xx-x86_64-1.4.27.tgz
Install using ReadMe.txt file. Pretty simple and can usually be undone on many platforms, requires copying a couple of files to /usr/local/include and /usr/local/lib dirs.
The below change will fix the misleading error above, while zjtag is being successfully compiled, zjtag.a library was failing and likely not needed when using zjtag. The fix was to standardize library calling, rather than using two different formats for calling libraries. Again, zjtag is being quietly successfully compiled, while zjtag.a is failing.
Makefile:
L_LIBS = -L/usr/local/lib -lftd2xx -lusb -ldl -lrt
S_LIBS = lnx/libftd2xx.a lnx/libusb.a -ldl -lpthread -lrt
Makefile should be:
L_LIBS = -L/usr/local/lib -lftd2xx -lusb -ldl -lrt
S_LIBS = -L/usr/local/lib -lftd2xx -lusb -ldl -lpthread -lrt