Building libwpg/wpg2svg/wpg2odg/Perfectspot in Windows

If libwpg, wpg2svg, wpg2odg, and/or Perfectspot is not installed and is not available as binary packages, then it is necessary for build everything from source-code. This page explains the necessary steps on how to do that in Windows.

Get the source code

To compile the source code, first it is necessary to obtain the source code. Refer to the download page on how to obtain the source code.

Check system requirement

The following tools/libraries are required to build the source code:

  • C++ compiler
  • pkg-config (at least version 0.20)
  • Standard C++ library
  • STL (Standard Template Library)
  • libwpd 0.8

In addition, Perfectspot needs:

  • CMake version 2.4.0 or newer
  • Qt version 4.2 or newer

Build libwpg and wpg2svg

libwpg and wpg2<something> tools can be built using Microsoft Visual C++ compiler ou GCC (MinGW) compiler suite.

Using GCC (MinGW) compiler suite.

This build can build DLLs, static libraries and both statically and dynamically linked binaries.

The build-time dependencies for this build are:

For the rest, it is enough to configure the build using:

PKG_CONFIG_PATH=\
"$PKG_CONFIG_PATH:<path-to-libwpd-devel-files>/lib/pkgconfig" ./configure --prefix=<prefix>

build the source using:

make all

and install it into <prefix> using:

make install

For building a CVS checkout, there is a build-time dependency on autotools (libtool, autoconf and automake). The included script autogen.sh can be used to create the configure environment:

ACLOCAL_FLAGS='-I<pkg-config's prefix>/share/aclocal' ./autogen.sh

Using Microsoft Visual C++

This build can build a static library and statically linked multithread (VS8 does not have anymore single thread C runtimes to link to) binaries. The only runtime dependency of the produces binaries is a kernel32.dll, so they should run basically on any 32-bit Windows.

For the build, libwpg.dsw project file located in \build\win32 subdirectory of the tarball. As a build-time dependency, it is necessary to have in the include path <libwpd/WPXStream.h> and <libwpd/libwpd_types.h> headers that are part of the libwpd library sources. Libwpd is not needed in the link process, so it is not really necessary to build it, just to have these two headers accessible for the compiler.

In case you are building a CVS checkout, you will find a little additional difficulety: The libwpg.h file is not present in the checkout. It is normally generated by the autotool build process at configure time. The solution is to copy the libwpg.h.in into libwpg.h and replace the occurences of @WPG_MAJOR_VERSION@, @WPG_MINOR_VERSION@ and @WPG_MICRO_VERSION@ with the corresponding values found in configure.in file.

Check libwpg installation

TODO

Build wpg2odg

TODO

Build Perfecspot

Note: to compile Perfectspot, it is necessary to create a directory to place the build. This is often called build directory. This directory can not be the same the source directory, i.e. where the source code is located.

TODO

Note

This product is not manufactured, approved, or supported by Corel Corporation or Corel Corporation Limited.