Building libwpg/wpg2svg/wpg2odg/Perfectspot in Linux

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 Linux.

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, such as gcc version 4.0 or later
  • 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

Open a terminal or console, then go the directory where the source code of libwpg is located.

Important: if the source code is the development version (obtained via CVS), please run ./autogen.sh first.

Run the configuration script by the following command:

./configure

By default, the installation prefix will be /usr/local. To change it, e.g. to /usr, run the configuration script using extra option:

./configure --prefix=/usr

If nothing is wrong, i.e. all the necessary tools and libraries are available, the following message will appear:

config.status: creating libwpg.spec
config.status: creating config.h
config.status: executing depfiles commands

Now start the compilation by running make as:

make

It may take some time until the compilation finishes.

After that, libwpg and wpg2svg can be installed by the following command (needs password for root):

sudo make install

Note: wpg2svg is packaged together with libwpg. Thus, compiling/installing libwpg also means compiling/installing wpg2svg.

Check libwpg installation

To verify that libwpg has been installed properly, use pkg-config such as:

pkg-config --modversion libwpg-0.1

If libwpg is available, the output should be the version of libwpg, e.g.:

0.1.0

If libwpg installation can not be found, there will be error message:

Package libwpg-0.1 was not found in the pkg-config search path.

Build wpg2odg

Open a terminal or console, then go the directory where the source code of wpg2odg is located.

Important: if the source code is the development version (obtained via CVS), please run ./autogen.sh first.

Run the configuration script by the following command:

./configure

By default, the installation prefix will be /usr/local. To change it, e.g. to /usr, run the configuration script using extra option:

./configure --prefix=/usr

Now start the compilation by running make as:

make

After that, wpg2odg can be installed by the following command (needs password for root):

sudo make install

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.

Open a terminal or console, then go the build directory.

Run cmake with the source directory, for example if Perfectspot source code is in /home/johndoe/perfectspot, then do the following:

cmake /home/johndoe/perfectspot

If nothing is wrong, i.e. all the necessary tools and libraries are available, the following message will appear:

-- Configuring done
-- Generating done
-- Build files have been written to: /home/johndoe/build

Now start the compilation by running make as:

make

If there is no error, Perfectspot can be launced by the command:

src/perfectspot

To install Perfectspot in the system, just copy the executable to the target directory, e.g. (needs root password):

sudo cp src/perfectspot /usr/local/bin

Note

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