Home | History | Annotate | Download | only in win32
      1 
      2 Expat can be built on Windows in two ways:
      3   using MS Visual Studio .NET or Cygwin.
      4 
      5 * Cygwin:
      6   This follows the Unix build procedures.
      7 
      8 * MS Visual Studio 2013, 2015 and 2017:
      9   A solution file for Visual Studio 2013 is provided: expat.sln.
     10   The associated project files (*.vcxproj) reside in the appropriate
     11   project directories. This solution file can be opened in VS 2015 or VS 2017
     12   and should be upgraded automatically if VS 2013 is not also installed.
     13   Note: Tests have their own solution files.
     14 
     15 * All MS C/C++ compilers:
     16   The output for all projects will be generated in the win32\bin
     17   directory, intermediate files will be located in project-specific
     18   subdirectories of win32\tmp.
     19   
     20 * Creating MinGW dynamic libraries from MS VC++ DLLs:
     21   
     22   On the command line, execute these steps:
     23   pexports libexpat.dll > expat.def
     24   pexports libexpatw.dll > expatw.def
     25   dlltool -d expat.def -l libexpat.a
     26   dlltool -d expatw.def -l libexpatw.a
     27   
     28   The *.a files are mingw libraries.
     29 
     30 * Special note about MS VC++ and runtime libraries:
     31 
     32   There are three possible configurations: using the
     33   single threaded or multithreaded run-time library,
     34   or using the multi-threaded run-time Dll. That is, 
     35   one can build three different Expat libraries depending
     36   on the needs of the application.
     37 
     38   Dynamic Linking:
     39 
     40   By default the Expat Dlls are built to link statically
     41   with the multi-threaded run-time library. 
     42   The libraries are named
     43   - libexpat(w).dll 
     44   - libexpat(w).lib (import library)
     45   The "w" indicates the UTF-16 version of the library.
     46 
     47   One rarely uses other versions of the Dll, but they can
     48   be built easily by specifying a different RTL linkage in
     49   the IDE on the C/C++ tab under the category Code Generation.
     50 
     51   Static Linking:
     52 
     53   The libraries should be named like this:
     54   Single-theaded:     libexpat(w)ML.lib
     55   Multi-threaded:     libexpat(w)MT.lib
     56   Multi-threaded Dll: libexpat(w)MD.lib
     57   The suffixes conform to the compiler switch settings
     58   /ML, /MT and /MD for MS VC++.
     59   
     60   Note: In Visual Studio 2005 (Visual C++ 8.0) and later, the
     61   single-threaded runtime library is not supported anymore.
     62 
     63   By default, the expat-static and expatw-static projects are set up
     64   to link statically against the multithreaded run-time library,
     65   so they will build libexpatMT.lib or libexpatwMT.lib files.
     66 
     67   To build the other versions of the static library, 
     68   go to Project - Settings:
     69   - specify a different RTL linkage on the C/C++ tab
     70     under the category Code Generation.
     71   - then, on the Library tab, change the output file name
     72     accordingly, as described above
     73 
     74   An application linking to the static libraries must
     75   have the global macro XML_STATIC defined.
     76