README.txt.svn-base 2.7 KB

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