Import expat-2.0.1
[dragonfly.git] / contrib / expat / win32 / README.txt
1
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.
4
5 * Cygwin:
6   This follows the Unix build procedures.
7
8 * C++ Builder 5:
9   Possible with make files in the BCB5 subdirectory.
10   Details can be found in the ReadMe file located there.
11
12 * MS Visual C++ 6:
13   Based on the workspace file expat.dsw. The related project
14   files (.dsp) are located in the lib subdirectory.
15
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.
19
20 * All MS C/C++ compilers:
21   The output for all projects will be generated in the win32\bin
22   directory, intermediate files will be located in project-specific
23   subdirectories of win32\tmp.
24   
25 * Creating MinGW dynamic libraries from MS VC++ DLLs:
26   
27   On the command line, execute these steps:
28   pexports libexpat.dll > expat.def
29   pexports libexpatw.dll > expatw.def
30   dlltool -d expat.def -l libexpat.a
31   dlltool -d expatw.def -l libexpatw.a
32   
33   The *.a files are mingw libraries.
34
35 * Special note about MS VC++ and runtime libraries:
36
37   There are three possible configurations: using the
38   single threaded or multithreaded run-time library,
39   or using the multi-threaded run-time Dll. That is, 
40   one can build three different Expat libraries depending
41   on the needs of the application.
42
43   Dynamic Linking:
44
45   By default the Expat Dlls are built to link statically
46   with the multi-threaded run-time library. 
47   The libraries are named
48   - libexpat(w).dll 
49   - libexpat(w).lib (import library)
50   The "w" indicates the UTF-16 version of the library.
51
52   One rarely uses other versions of the Dll, but they can
53   be built easily by specifying a different RTL linkage in
54   the IDE on the C/C++ tab under the category Code Generation.
55
56   Static Linking:
57
58   The libraries should be named like this:
59   Single-theaded:     libexpat(w)ML.lib
60   Multi-threaded:     libexpat(w)MT.lib
61   Multi-threaded Dll: libexpat(w)MD.lib
62   The suffixes conform to the compiler switch settings
63   /ML, /MT and /MD for MS VC++.
64   
65   Note: In Visual Studio 2005 (Visual C++ 8.0) and later, the
66   single-threaded runtime library is not supported anymore.
67
68   By default, the expat-static and expatw-static projects are set up
69   to link statically against the multithreaded run-time library,
70   so they will build libexpatMT.lib or libexpatwMT.lib files.
71
72   To build the other versions of the static library, 
73   go to Project - Settings:
74   - specify a different RTL linkage on the C/C++ tab
75     under the category Code Generation.
76   - then, on the Library tab, change the output file name
77     accordingly, as described above
78
79   An application linking to the static libraries must
80   have the global macro XML_STATIC defined.