mingw, strawberrry-perl and libxml2 on Win32
I found myself needing a perl script on a windows server. I run strawberry-perl distro on these servers. The perl script needed libxml2. As you may not know, strawberry-perl is built with entirely free tools. (mingw) There is the gnuwin32 project that builds gnu libraries using Microsoft’s build tools, but THAT won’t work.
This might work.
1. Go to the xmlsoft.org website and get libxml$lastest_version$.tar.gz.
2. Extract it into c:\strawberry-perl If you are very knowledgeable, this isn’t necessary, but it makes the paths that follow work.
3. Open a console and cd into c:\strawberry-perl\libxml$yourVersion$\win32.
4. cscript configure.js compiler=mingw incdir=C:\strawberry-perl\mingw\include libdir=C:\strawberry-perl\mingw\lib iconv=no
include=C:\strawberry-perl\mingw\include lib=C:\strawberry-perl\mingw\lib prefix=C:\strawberry-perl\mingw\
5. enter c:\strawberry-perl\mingw\bin\mingw32-make.exe on the command line
6. I had make fail. Dowwwh! The fail had something to do with the declaration of uint32_t. I found it on line 29, commented that line out and added this just below it. typedef unsigned __int32
7. c:\strawberry-perl\mingw\bin\mingw32-make.exe install on the command line.
8. Now, if I’m lucky, XML::LibXML will work!
