|Building libxml2 and libxslt on Windows
||[Sep. 1st, 2015|06:11 am]
I had a little trouble building these from source with MSVC so I thought I'd record the issues I faced both so that I can refer back to this post if I forget, and perhaps help others along the way.
For libxml2, download the source and cd to the libxml2-x.x.x\win32 directory. Then run "cscript configure prefix=C:\usr iconv=no". Replace "C:\usr" with wherever you want to install it. Ignore the "iconv=no" bit if you want to try to build with iconv support.
If you get "win32\configure.js(197, 2) Microsoft JScript runtime error: File not found", then hand edit the configure.js file and replace "configure.in" with "configure.ac" and try again.
Then run "nmake /f Makefile.msvc", followed by "nmake /f Makefile.msvc install". That should mostly do it. It does not seem to build or install any sort of xml2-config script, but I found a batch file at https://mail.gnome.org/archives/xml/2012-December/msg00014.html that I copy and pasted into C:\usr\bin. Seems to work.
For libxslt, download the source and cd to the libxslt-x.x.x\win32 directory. Then run "cscript configure prefix=C:\usr lib=C:\usr include=C:\usr\include\libxml2 iconv=no", replacing "C:\usr" with wherever you installed libxml2. Remove the "iconv=no" if you want to try to build with iconv support.
Then run "nmake". If you see "LINK : fatal error LNK1117: syntax error in option 'OPT:NOWIN98'", then hand edit the Makefile and remove that switch, then run "nmake" again. It should build. Then run "nmake install".
That should do it, though I haven't found an xslt-config script yet.