[cairo] librsvg and cairo on Windows

Freddie Witherden freddie at witherden.org
Thu Oct 15 09:12:27 PDT 2009


On Thursday 15 October 2009 11:13:53 Tor Lillqvist wrote:
> The librsvg DLL there depends on quite a bunch of other DLLs:
> libcairo-2.dll, libgio-2.0-0.dll, libglib-2.0-0.dll,
> libgobject-2.0-0.dll,  libgdk_pixbuf-2.0-0.dll, libcroco-0.6-3.dll,
> libgsf-1-114.dll, libxml2-2.dll, libpango-1.0-0.dll and
> libpangocairo-1.0-0.dll. And those then add dependency on
> libfontconfig-1.dll, freetype6.dll, libpng12-0.dll and zlib1.dll.
> Hopefully I got them all.
> 
> To get all these you need the corresponding packages from the same
> site, i.e. cairo, glib, gtk+, libcroco, libgsf, libxml2, pango,
> fontconfig, freetype, libpng and zlib. Hope I didn't miss any. Quite a
> load, and I certainly admit that manually finding out what all you
> need to download, and keeping a look for new versions as they are
> released and built and provided, is a chore. Some kind of package
> management would be nice.

Not a nice set of dependencies to satisfy, IMO.

My understanding from your original message is that you want to parse and 
render SVG files. If this is the case then I highly recommend you look into 
using Qt - http://qt.nokia.com/products ; which like Cairo and friends is LGPL 
licensed.

Don't let the fact that it is a full-blown widget toolkit put you off :) The 
SVG module (QtSVG) is reasonably full-featured and extremely easy to use. In 
addition the Qt source as downloaded has *no* external dependencies, compiles 
under both MinGW and MSVC and can easily be statically compiled. Many build-
time configurations are provided. On my desktop I have full-blown statically 
linked Qt applications than come in at under 1.5MiB. (And yes, they do make 
use of the SVG functionality for icon rendering.)

It is worth pointing out that Qt is C++ based which may or may not pose a 
problem.

This approach will significantly reduce the size of your application and reduce 
the amount of manual dependency management you need to perform.

rsvg is great if you're writing a GTK+ based desktop application, but a 
nightmare if you just want to add SVG functionality to a cross-platform 
application. 

Regards, Freddie.


More information about the cairo mailing list