README.txt 3.1 KB

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