xmlversion.h:39:24: error: 'NaN' undeclared (first use in this function)
I am trying to compile libxml on my windows machine (windows 10)
using GCC (tdm64-1) 5.1.0 (MinGW) and I get the following error:
In file included from ../include/libxml/xmlstring.h:15:0,
from ../libxml.h:12,
from ../parserInternals.c:11:
../parserInternals.c: In function 'xmlCheckVersion':
../include/libxml/xmlversion.h:39:24: error: 'NaN' undeclared (first use in this function)
#define LIBXML_VERSION NaN
^
../parserInternals.c:78:27: note: in expansion of macro 'LIBXML_VERSION'
int myversion = (int) LIBXML_VERSION;
^
../include/libxml/xmlversion.h:39:24: note: each undeclared identifier is reported only once for each function it appears in
#define LIBXML_VERSION NaN
^
../parserInternals.c:78:27: note: in expansion of macro 'LIBXML_VERSION'
int myversion = (int) LIBXML_VERSION;
^
mingw32-make: *** [int.mingw/parserInternals.o] Error 1
The problem occur when I try to run Makefile.mingw
running line:
C:\TDM-GCC-64\bin\mingw32-make.exe -f Makefile.mingw
I also tried adding -std=c99
to the CFLAGS in the makefile (saw that as a workaround for a similar problem) but I got the same error.