Åke,
It’s not just you; I encountered this problem over a year ago. It seems that
libtool is supposed to automatically determine the dependency on ftd2xx.lib,
but doesn’t do so. It generated a dependency file that was basically empty.
Unfortunately I don’t know libtool well enough to know how to fix it
“correctly”.
I believe if you look in src/.libs/liburjtag.lai (or maybe it was just
src/liburjtag.la?), you can see the dependencies that libtool generated. Mine
looks like this:
# liburjtag.la - a libtool library file
# Generated by ltmain.sh (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname=''
# Names of this library.
library_names=''
# The name of the static archive.
old_library='liburjtag.a'
# Linker flags that can not go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=''
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for liburjtag.
current=0
age=0
revision=0
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/usr/local/lib'
Notice the complete lack of any mention of ftd2xx. (The file src/liburjtag.la
only differs in “installed=no”.)
--
~ Peter Budny
Unicoi Systems
supp...@unicoi.com
From: Åke Rehnman [mailto:ake.rehn...@gmail.com]
Sent: Sunday, October 14, 2012 7:01 AM
To: urjtag-development@lists.sourceforge.net
Subject: [UrJTAG-dev] Trouble linking with ftd2xx.lib
I had trouble linking with FTDI windows library. I finally had to resort to
change the configure script, then rename the library to libftd2xx.a to get the
linking to complete. It seems like the ftd2xx.lib is completely missing from
the link command line.
Any Idea what the problem is?
/Ake
Making all in src/apps/jtag
make[2]: Entering directory `/cygdrive/c/akre/urjtag/urjtag/src/apps/jtag'
/bin/sh ../../../libtool --tag=CC --mode=link gcc -std=gnu99 -Wall
-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -gstabs+ -O0
-I/cygdrive/c/akre/urjtag/ftdi-cdm-drivers -o jtag.exe jtag.o
../../../src/liburjtag.la -lintl -lioperm -lreadline
libtool: link: gcc -std=gnu99 -Wall -Wmissing-prototypes -Wstrict-prototypes
-Wpointer-arith -gstabs+ -O0 -I/cygdrive/c/akre/urjtag/ftdi-cdm-drivers -o
jtag.exe jtag.o ../../../src/.libs/liburjtag.a -L/usr/local/lib
-L/usr/lib/ncursesw -L/usr/lib /usr/local/lib/libusb-1.0.dll.a
/usr/lib/libintl.dll.a /usr/lib/libiconv.dll.a /usr/lib/libioperm.dll.a
/usr/lib/libpopt.dll.a -lreadline -L/usr/local/lib -L/usr/local/lib
../../../src/.libs/liburjtag.a(libftd2xx.o): In function `usbconn_ftd2xx_flush':
/cygdrive/c/akre/urjtag/urjtag/src/tap/usbconn/libftd2xx.c:124: undefined
reference to `__imp__FT_Write@16'
/cygdrive/c/akre/urjtag/urjtag/src/tap/usbconn/libftd2xx.c:160: undefined
reference to `__imp__FT_Read@16'
../../../src/.libs/liburjtag.a(libftd2xx.o): In function `usbconn_ftd2xx_read':
/cygdrive/c/akre/urjtag/urjtag/src/tap/usbconn/libftd2xx.c:222: undefined
reference to `__imp__FT_Read@16'
../../../src/.libs/liburjtag.a(libftd2xx.o): In function
`usbconn_ftd2xx_connect':
/cygdrive/c/akre/urjtag/urjtag/src/tap/usbconn/libftd2xx.c:354: undefined
reference to `__imp__FT_Close@4'
.
. a lot more of these
.
/cygdrive/c/akre/urjtag/urjtag/src/tap/usbconn/usbconnft232r.c:502: undefined
reference to `__imp__FT_SetBitMode@12'
/cygdrive/c/akre/urjtag/urjtag/src/tap/usbconn/usbconnft232r.c:509: undefined
reference to `__imp__FT_Close@4'
../../../src/.libs/liburjtag.a(usbconnft232r.o): In function
`usbconn_ft232r_close':
/cygdrive/c/akre/urjtag/urjtag/src/tap/usbconn/usbconnft232r.c:529: undefined
reference to `__imp__FT_Close@4'
collect2: ld returned 1 exit status
Makefile:420: recipe for target `jtag.exe' failed
make[2]: *** [jtag.exe] Error 1
make[2]: Leaving directory `/cygdrive/c/akre/urjtag/urjtag/src/apps/jtag'
Makefile:451: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/c/akre/urjtag/urjtag'
Makefile:381: recipe for target `all' failed
make: *** [all] Error 2
Changed configure.ac
@@ -294,11 +295,14 @@
HAVELIBFTD2XX=yes
case $host in
*cygwin*|*mingw*)
+#akre
CFLAGS="$CFLAGS -I$with_ftd2xx"
- AS_IF([test -d "$with_ftd2xx/i386"], [
+ LDFLAGS="$LDFLAGS -no-undefined -L$with_ftd2xx"
+ AS_IF([test -d "$with_ftd2xx/i386x"], [
FTD2XXLIB="$with_ftd2xx/i386/ftd2xx.lib"
],[
- FTD2XXLIB="$with_ftd2xx/ftd2xx.lib"
+# FTD2XXLIB="$with_ftd2xx/ftd2xx.lib"
+ FTD2XXLIB="-lftd2xx $LIBS"
])
;;
*)
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
UrJTAG-development mailing list
UrJTAG-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/urjtag-development