2 Expat can be built on Windows in three ways:
3 using MS Visual C++ (6.0 or .NET), Borland C++ Builder 5 or Cygwin.
6 This follows the Unix build procedures.
9 Possible with make files in the BCB5 subdirectory.
10 Details can be found in the ReadMe file located there.
13 Based on the workspace file expat.dsw. The related project
14 files (.dsp) are located in the lib subdirectory.
16 * MS Visual Studio .NET 2002, 2003, 2005:
17 The VC++ 6 workspace file (expat.dsw) and project files (.dsp)
18 can be opened and imported in VS.NET without problems.
20 * Creating MinGW dynamic libraries from MS VC++ DLLs:
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
28 The *.a files are mingw libraries.
30 * Special note about MS VC++ and runtime libraries:
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.
40 By default the Expat Dlls are built to link statically
41 with the multi-threaded run-time library.
42 The libraries are named
44 - libexpat(w).lib (import library)
45 The "w" indicates the UTF-16 version of the library.
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.
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++.
60 Note: In Visual Studio 2005 (Visual C++ 8.0) and later, the
61 single-threaded runtime library is not supported anymore.
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.
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
74 An application linking to the static libraries must
75 have the global macro XML_STATIC defined.