Difference between revisions of "Inkscape Devlibs"

From Inkscape Wiki
Jump to navigation Jump to search
(Created page with 'Inkscape Devlibs are a bundle of libraries and tools used to compile Inkscape. It is hosted in a [https://launchpad.net/inkscape-devlibs Launchpad repository]. == Updating the C...')
 
Line 27: Line 27:
 
  $ FT2_LIBS=`pkg-config --libs freetype2`
 
  $ FT2_LIBS=`pkg-config --libs freetype2`
 
  $ CXXFLAGS="-O2 $FT2_CFLAGS" LDFLAGS="$FT2_LIBS" ./configure --prefix=/c/devlibs-update
 
  $ CXXFLAGS="-O2 $FT2_CFLAGS" LDFLAGS="$FT2_LIBS" ./configure --prefix=/c/devlibs-update
 +
* giomm (which is part of glibmm) has a defective main header which includes Unix-specific stuff that is not built on Windows. Comment out the following three includes in C:\devlibs-update\include\giomm-2.4\giomm.h. Otherwise gtkmm will not build.
 +
#include <giomm/desktopappinfo.h>
 +
#include <giomm/unixinputstream.h>
 +
#include <giomm/unixoutputstream.h>
 
* Prune C:\devlibs-update from unneeded stuff. In particular, you don't need static libraries, documentation and example programs. Note however that you DO need import libraries. They end with .dll.a - don't confuse them with static libraries that end with .a.
 
* Prune C:\devlibs-update from unneeded stuff. In particular, you don't need static libraries, documentation and example programs. Note however that you DO need import libraries. They end with .dll.a - don't confuse them with static libraries that end with .a.
 
* Copy the contents of C:\devlibs-update to C:\devlibs and enjoy.
 
* Copy the contents of C:\devlibs-update to C:\devlibs and enjoy.

Revision as of 00:53, 1 February 2010

Inkscape Devlibs are a bundle of libraries and tools used to compile Inkscape. It is hosted in a Launchpad repository.

Updating the C part of devlibs

The C part of devlibs can be directly copied from official development bundles. Do not copy unneeded stuff like .lib, .def, static libraries, examples or documentation.

Rebuilding the C++ part of devlibs

This is a description of the process I used to build the C++ libraries present in the devlibs. --Tweenk 00:50, 1 February 2010 (UTC)

  • Install the TDM-GCC build of MinGW into c:\tdm-gcc (or any other folder)
  • Install MSYS. Choose c:\tdm-gcc as your MinGW installation directory.
  • Install Doxygen. gtkmm wants it, otherwise it won't build.
  • Download current devlibs into C:\devlibs
  • Download sources for C++ libraries. Those are: libsigc++, glibmm, cairomm, pangomm, gtkmm. We use only header-only libraries from boost, so it doesn't need to be rebuilt - just copy the headers.
  • Create an empty directory C:\devlibs-update
  • Run MSYS. Set up paths the following way. The object of this is to build gtkmm using the glibmm you have just built.
$ export PKG_CONFIG_PATH=/c/devlibs-update/lib/pkgconfig:/c/devlibs/pkgconfig
$ PATH="/c/devlibs-update/bin:$PATH:/c/devlibs/bin"
$ PATH="$PATH:/c/Program Files/Doxygen/bin"
  • For each C++ library, configure, build and install it. Do it in the following order: libsigc++, glibmm, cairomm, pangomm, gtkmm. The commands should look like this:
$ CXXFLAGS="-O2" ./configure --prefix=/c/devlibs-update
$ make
$ make install
  • pangomm, cairomm and gtkmm seem to want Freetype2, but don't use pkg-config to find it. For them, do something like this. Note that those are backticks, not apostrophes.
$ FT2_CFLAGS=`pkg-config --cflags freetype2`
$ FT2_LIBS=`pkg-config --libs freetype2`
$ CXXFLAGS="-O2 $FT2_CFLAGS" LDFLAGS="$FT2_LIBS" ./configure --prefix=/c/devlibs-update
  • giomm (which is part of glibmm) has a defective main header which includes Unix-specific stuff that is not built on Windows. Comment out the following three includes in C:\devlibs-update\include\giomm-2.4\giomm.h. Otherwise gtkmm will not build.
#include <giomm/desktopappinfo.h>
#include <giomm/unixinputstream.h>
#include <giomm/unixoutputstream.h>
  • Prune C:\devlibs-update from unneeded stuff. In particular, you don't need static libraries, documentation and example programs. Note however that you DO need import libraries. They end with .dll.a - don't confuse them with static libraries that end with .a.
  • Copy the contents of C:\devlibs-update to C:\devlibs and enjoy.