Compile EXPAT for statically linked .a on Windows

I am writing a C program on Windows using MingW and want to use the EXPAT XML library. I want my program to be static, so I need a static .a library.

Is there a way to compile EXPAT for a .a static, independent library on Windows?

+3
source share
3 answers

If you download official releases from the Expat Sourceforge project page , you will not be able to compile and install the library using MSYS or MinGW. To configure, create and install you will need to install CygWin.

MinGW configure script libtool. expa tarball, MinGW expat.

+2

, . ?

0

expat MinGW:

  • cmd
  • : mingw-get update ()
  • ():
    • dynamic (.dll): mingw-get install expat
    • static (.a .dll.a): mingw-get install libexpat
  • , , ...
    • lib <your mingw>/bin, : libexpat-1.dll
    • lib in static <your mingw>/lib, file: libexpat.a, libexpat.dll.a,libexpat.la

Package Overview:

  • expat package : dynamic libexpat-1.dllon xmlwf.exe
  • libexpat package : static libexpat.a, libexpat.dll.aandlibexpat.la
0
source

Source: https://habr.com/ru/post/1751976/


All Articles