INSTALL 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. Building on UNIX
  2. ================
  3. The following build instructions are for the Linux/UNIX/Mac OS X
  4. operating systems as well as for Cygwin and MinGW on Windows.
  5. The standard autotools-based build system is used on these platforms. After
  6. unpacking the source code archive, change to the libstudxml package directory
  7. (referred to as libstudxml/ from now on) and run the configure script:
  8. ./configure
  9. To see the available configuration options run configure with --help:
  10. ./configure --help
  11. As an example, the following configure command only builds shared libraries,
  12. uses the specified C++ compiler, and compiles with optimization and without
  13. debug information:
  14. ./configure --disable-static CXX=g++-4.9 CXXFLAGS=-O3
  15. One configure option worth mentioning is --with-extern-expat. It makes
  16. libstudxml use an external Expat library rather than bulding-in the
  17. internal version.
  18. Once configuration is complete, run make to build libstudxml:
  19. make
  20. Once the build is completed successfully you can run the tests using
  21. the check target:
  22. make check
  23. You can also install the libstudxml headers and libraries using the
  24. install target (you may need to do this step as root depending on the
  25. installation directory):
  26. make install
  27. Building on Windows
  28. ===================
  29. The following build instructions are for Windows using Microsoft Visual
  30. Studio. If you would like to build libstudxml with GCC either using Cygwin
  31. or MinGW, refer to the "Building on UNIX" section above.
  32. The standard Visual Studio project and solution files are used on this
  33. platform. To build the libstudxml library, unpack the source code archive
  34. and open the libstudxml-vc<N>.sln file located in the libstudxml package
  35. directory (referred to as libstudxml\ from now on). Here <N> is the version
  36. of Visual Studio that you are using. Once the solution is open, select
  37. the desired build configuration (Debug or Release) and platform (Win32
  38. or x64) and build the solution.
  39. The resulting 32-bit DLLs and import libraries are placed into the
  40. libstudxml\bin\ and libstudxml\lib\ directories, respectively. Similarly,
  41. the 64-bit DLLs and import libraries are placed into libstudxml\bin64\
  42. and libstudxml\lib64\. The Release versions of the import libraries are
  43. named studxml.lib and the Debug versions are named studxml-d.lib.
  44. To configure Visual Studio to automatically locate the libstudxml headers,
  45. DLLs, and import libraries, add the following paths to your VC++
  46. Directories:
  47. Win32:
  48. Include: ...\libstudxml
  49. Library: ...\libstudxml\lib
  50. Executable: ...\libstudxml\bin
  51. x64:
  52. Include: ...\libstudxml
  53. Library: ...\libstudxml\lib64
  54. Executable: ...\libstudxml\bin64
  55. If you would like to build the libstudxml examples, also open and build
  56. the solution in the examples/ subdirectory. Similarly, to built the tests,
  57. open and build the solution in the tests/ subdirectory.
  58. While you can run the tests and examples manually, it is also possible
  59. to run all the tests and all the examples automatically using the test.bat
  60. batch files located in the examples\ and tests\ directories.