On Wed, Feb 3, 2021 at 3:48 AM <drfiemost@xxxxxxxx> wrote:
>
> Hello,
>
> when compiling against libftdi (version 1.5) on MinGW I get this error:
>
> C:/msys64/mingw64/include/libftdi1/ftdi.h:481:20: error: field 'time' has
> incomplete type
> 481 | struct timeval time;
> | ^~~~
>
> Found out that this happens because I use WIN32_LEAN_AND_MEAN
> which prevents the definition of struct timeval.
> I can workaround this problem but think that it should be handled in the
> ftdi.h header,
> either undefining WIN32_LEAN_AND_MEAN before windows.h is included or by
> explicitly including Winsock2.h.
> What do you think?
Just wondering which MinGW version you are using? I had no problem building
libftdi under MSYS2 distribution of MinGW-w64 (32/64bit).
Ref:
https://sourceforge.net/projects/picusb/files/
If you use MinGW.org (32bit only), take note it may not work well. In fact
at libusb project we no longer support MinGW.org unless someone is
willing to submit patches.
Ref: libusb and MinGW -- MinGW-w64 recommended
https://github.com/libusb/libusb/issues?q=is%3Aissue+is%3Aclosed+mingw
--
Xiaofan
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|