On Tue, Sep 14, 2010 at 12:57 AM, Drasko DRASKOVIC
<drasko.drasko...@gmail.com> wrote:
> On Mon, Sep 13, 2010 at 4:38 PM, Laurent Gauch
> <laurent.ga...@amontec.com> wrote:
>> Download our new Amontec JTAGkey Driver from :
>> http://www.amontec.com/download/amontec-jtagkey-driver-d2xx-20091124.zip
>
> Hi Laurent,
> thanks very much. I can confirm that with this drivers it is compiling
> and working fine.

Good to hear that. Are you saying that you do not need to do anything
to the FTDI library file to build openocd_d2xx?

Last time I needed to do something to the FTDI driver
(maybe older version) to solve the "Cannot build & run test program
using ftd2xx.lib" problem.

***************
http://forum.sparkfun.com/viewtopic.php?t=17598

"The problem here is that MinGW does expect DLL translated
names from .lib files to begin with __imp__ (eg: __imp__FT_GetLibraryVersion)
whereas Visual C++ libraries provide names beginning with __imp_
 (eg: __imp_FT_GetLibraryVersion). The problem really is something as
stupid as using one or two underscores to declare the names of the DLL
functions in the relevant .lib file, but because of that we can't use the .lib
provided by FTDI. Instead we need to recreate one.
Now, because the library has been stripped, you would normally need to
use the Visual Studio tool command "dumpbin /exports ftd2xx64.dll >
exports.txt"
and use it to create a .def file with the library members, that you can then
use with MinGW's dlltool, but the truth is, with the current FTDI lib, the
 following command will give you what you want, thus:

cd /usr/src/ftd2xx/amd64
echo "LIBRARY ftd2xx64.dll" > ftd2xx64.def
echo "EXPORTS" >> ftd2xx64.def
strings ftd2xx64.dll | grep FT_ >> ftd2xx64.def
mv ftd2xx.lib ftd2xx.lib.old
dlltool.exe -d ftd2xx64.def -l ftd2xx.lib

This should create a new "ftd2xx.lib" that MinGW can understand.
Note: Don't forget the "LIBRARY" line in your def file, otherwise any
executable created with the FTDI library will fail with the error
"the application failed to start because "(null).dll" was not found".
***********************


-- 
Xiaofan
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to