I am writing C program on Windows with MingW and want to use EXPAT XML library. I want to compile my program statically, so I need static .a library.
Is there any way to compile EXPAT to .a static, independent library on Windows?
I am writing C program on Windows with MingW and want to use EXPAT XML library. I want to compile my program statically, so I need static .a library.
Is there any way to compile EXPAT to .a static, independent library on Windows?
If you download official releases from Expat Sourceforge project page you won't be able to compile and install the library with MSYS nor MinGW. You will need an installation of CygWin to configure, make and install.
To compile and install native MinGW library you need modified version of configure
script and libtool
. Just download expat source tarball provided by MinGW instead of main original expat. Also you may want use precompiled binaries instead
You can get dynamic and static version of expat using MinGW package installer:
mingw-get update
(optional)mingw-get install expat
mingw-get install libexpat
<your mingw>/bin
, file: libexpat-1.dll
<your mingw>/lib
, files: libexpat.a
, libexpat.dll.a
, libexpat.la
Package overview:
libexpat-1.dll
incl. xmlwf.exelibexpat.a
, libexpat.dll.a
and libexpat.la
I just downloaded and built the package, it appears to have made a static library by default. What's not working for you?