[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] Building using MinGW
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-devel] Building using MinGW |
Date: |
Wed, 18 Dec 2019 12:31:33 +0100 |
Gisle Vanem wrote:
> Trying to build lwIP using TDM-gcc 5.1.0 (MinGW), now produces
> this error:
> In file included from f:/MingW32/src/inet/libpcap/pcap/pcap.h:74:0,
> from f:/MingW32/src/inet/libpcap/pcap.h:43,
> from contrib/ports/win32/pcapif.c:50:
> f:/MingW32/src/inet/libpcap/pcap/pcap-inttypes.h:48:6: error: #error
> "Building libpcap
> requires VS 2015 or later"
> #error "Building libpcap requires VS 2015 or later"
> ^
>
>
> The cause of this is the "define _MSC_VER 1500" in pcapif.c:
> /* e.g. mingw */
> #define _MSC_VER 1500
> #include "pcap.h"
> #undef _MSC_VER
>
> Bumping '_MSC_VER' to 1900 fixes this. But why are these lines needed?
Hmm, I really can't remember. Probably because the pcap sources I used at that
time did not work without defining it? I don't think mingw defines _MSC_VER, and
since the pcap headers do different things without it, this made it work.
But I'm not using mingw, so that #else case in pcapif.c is probably not used by
anyone right now. Feel free to get it compiling for you in the best way and
provide a patch :)
Regards,
Simon