Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

How to Set up?

Using Microsoft Office
Using Libre Office

The document library facilitates the usage of the Document Automation API of Microsoft and/or the API's of Libreoffice in a very easy to use and intuitive manner. However, some amount of work needs to be done before the library can be compiled using Boost.Build and used.

You would need to install Microsoft Office 2003 or above as certain features are not available in Office'97. Also, Visual Studio would be recommended as the Library has been tested to compile using Visual Studio on Windows and uses the Visual Studio included header files. If these prerequisities are satisfied, one needs to open a shell at boost_document_lib\build and run '..\..\..\b2' to compile the library. This shall work only on Windows and not on Linux.

You would need to atleast install Libre Office 4 and the Libre Office SDK at least with the default folder configuration. Expected folder path of Libreoffice is C:\Program Files (x86)\LibreOffice 4\ on Windows and /usr/lib/libreoffice/ on Linux.

  1. Install SDK using variant of the following command sudo apt-get install libreoffice-dev.
  2. On the terminal, Go to /usr/lib/libreoffice/sdk.
  3. Set the appropriate environment variables using source setsdkenv_unix.sh
  4. Change directory to the appropriate SDK Directory in your home folder.
  5. Run the following command to generate the includes, Add -BUCR after -Gc if necessary. cppumaker -Gc -O"$OO_SDK_OUT/include/" /usr/lib/ure/share/misc/types.rdb /usr/lib/libreoffice/program/types/offapi.rdb /usr/lib/libreoffice/program/types/oovbaapi.rdb
  6. Change directory to your boost directory which you downloaded from sourceforge. Go to libs/ folder.
  7. Clone the library from github as document. git clone https://github.com/anuragxel/boost-document.git document
  8. Change directory to the build/ dicrectory.
  9. Run ../../../b2 to compile the library. You may need to run bootstrap.sh in the boost/ directory first to generate b2.
  1. Install both LibreOffice 4.4 and LibreOffice 4.4 SDK by downloading them from the official website.
  2. Open Your Command Prompt, go to C:\Program Files (x86)\LibreOffice 4\sdk and run setsdkenv_windows.bat and provide the necessary paths. Install cat, sed, zip.
  3. Add C:\Program Files (x86)\LibreOffice 4\URE\bin to the system PATH.
  4. Go to C:\Program Files (x86)\LibreOffice 4\sdk\bin and run the following command to generate the includes, cppumaker.exe -Gc -O"$OO_SDK_OUT\include" "C:\Program Files (x86)\LibreOffice 4\URE\misc\types.rdb" "C:\Program Files (x86)\LibreOffice 4\program\types\oovbaapi.rdb" "C:\Program Files (x86)\Libreoffice 4\program\types\offapi.rdb"
  5. Change directory to the boost libs directory (assuming you have already run bootstrap.bat, else run it now)
  6. Clone the library from github as document. git clone https://github.com/anuragxel/boost-generic-document-library.git document
  7. Change directory to the build/ dicrectory.
  8. Run ../../../b2 to compile the library. You may need to run bootstrap.bat in the boost/ directory first to generate b2.exe.

PrevUpHomeNext