libftdi Archives

Subject: compile static application, libftdi-0.20

From: gobo <gobo770@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 30 Jun 2015 14:06:34 -0500
hello everyone.

i'm experimenting with libftdi-0.20.  0.20 has been compiled on a test
box, but not
installed.

my project code has been tested with dynamic libraries built with the command
line below and they work as expected.

    gcc -o traffic -L. -Wl,-rpath=/mnt/nas3/proj/usbbb/code/test20
traffic.c -lftdi

the next step was to build using a static libftdi.  the archive file was moved
from src/.libs to my code directory.  compile command:

    gcc -static -o traffic traffic.c -L. -lftdi

with this command i get undefined references to all of the libftdi functions.
./libftdi.a(ftdi.o): In function `ftdi_usb_close_internal':
/proj/usbbb/code/test20/libftdi-0.20/src/ftdi.c:68: undefined
reference to `usb_close'
./libftdi.a(ftdi.o): In function `ftdi_usb_find_all':
/proj/usbbb/code/test20/libftdi-0.20/src/ftdi.c:272: undefined
reference to `usb_init'

the archive has the correct member:
$ ar -t libftdi.a
ftdi.o

can anyone explain what is wrong?  or what i'm doing wrong.

thanks.

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread