On Wed, Apr 4, 2012 at 5:57 PM, Thomas Heller <theller@xxxxxxxxxx> wrote:
> Actually it is really easy to compile libftdi on Windows, with MSVC
> (currently I'm only interested in the dll itself, not the other stuff).
>
> Inside a MSVC command prompt, I have built libftdi.dll with this command
> line:
>
> cl /Ox /LD -I ..\..\libusb-win32-bin-1.2.6.0\include ftdi.c /Felibftdi.dll
> ..\..\libusb-win32-bin-1.2.6.0\lib\msvc\libusb.lib
>
> I had to specify the path of the libusb import library and the directory of
> the libusb include file.
> Unfortunately the libusb include file must be renamed or copied
> from lusb0_usb.h to usb.h.
Yes we (libusb-win32 project) change the include name because
of conflict with WDK and MinGW-w64's usb.h.
> This library does not define any exported functions, I have made a patch
> that fixes this which is appended.
>
> Would a patch like this (it is against the libftdi-0.x branch of the git
> repository) be accepted?
>
Usually people do this with a def file when building the DLL.
But I am not an expert in MSVC.
Example from libusb-win32.
http://libusb-win32.svn.sourceforge.net/viewvc/libusb-win32/trunk/libusb/libusb0.def?revision=413&view=markup&pathrev=413
> PS: Building with CMAKE also works on windows, although again I only
> tested building the DLL itself, neither examples, docs, or whatever.
The examples build need some fixes for MSVC.
--
Xiaofan
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|