On 25/06/2012 18:17, Vivien Giraud wrote:
> On 25/06/2012 15:13, Bill Traynor wrote:
>> On Mon, Jun 25, 2012 at 3:54 AM, Vivien Giraud<[email protected]>   wrote:
>>> Hi,
>>> How do you do to compile OpenOCD with static libs ?
>> Which libs?  What host OS?
>>
>> For ft2232-lib you'd add something like this to your ./configure:
>>
>> --with-ft2232-lib=static
> When I try with your option I have an error, so I use :
>
> LDFLAGS='-lftdi -lusb' ./configure --with-ft2232-lib=static
>
> And then I have :
>
> libtool: link: gcc -std=gnu99 -g -O2 -Wall -Wstrict-prototypes
> -Wformat-security -Wshadow -Wextra -Wno-unused-parameter
> -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -o openocd
> main.o  ./.libs/libopenocd.a -lftdi -lusb ../jimtcl/libjim.a -ldl
> ./.libs/libopenocd.a(interfaces.o):(.data+0x0): undefined reference to
> `ftdi_interface'
> collect2: ld returned 1 exit status
>
> So I try :
>
> LDFLAGS='-lftdi -lusb' ./configure --with-ft2232-lib=static
> --enable-ft2232_libftdi
>
> It's work but it's not static :(
>
> do you have any idea how to ?
>
> Thanks

Anyone have an idea ?
I add a file in openocd which use libusb and libftdi, but when I compile 
(make with ./configure --with-ft2232-lib=static) I've a lot of error, 
like that :

/home/vivien/Desktop/openocdcopie/src/detection.c:258: undefined 
reference to `ftdi_write_data'
./.libs/libopenocd.a(libopenocd_la-detection.o): In function `init_ftdi':
/home/vivien/Desktop/openocdcopie/src/detection.c:289: undefined 
reference to `ftdi_usb_purge_buffers'
./.libs/libopenocd.a(libopenocd_la-detection.o): In function 
`shift_instruction':
/home/vivien/Desktop/openocdcopie/src/detection.c:400: undefined 
reference to `ftdi_write_data'
/home/vivien/Desktop/openocdcopie/src/detection.c:408: undefined 
reference to `ftdi_read_data'
collect2: error: ld returned 1 exit status

I have already include ftdi.h on.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to