KML: problems while compiling

Alain Muls alain.muls at
Fri Jul 8 18:31:52 UTC 2011

Hi All

I installed the libkmldev package for creating KML files to use in
GoogleEarth. As development environment I use QT-creator and make
console or GUI applications using the Qt APIs.

I tested the compilation using the createkml example, which I
integrated into a basic Qt console application (main.cpp). The
makefile is obtained from a .pro file running qmake. The .pro-file I
used was:

QT       += core

QT       -= gui

TARGET = createkml
CONFIG   += console
CONFIG   -= app_bundle


SOURCES += main.cpp

During compile, the compiler complained that the dom.h file is not
available. So I looked for it and found it in the /usr/include/kml
directory. I adjusted the .pro file by adding:

INCLUDEPATH += /usr/include/kml

which allowed to compile, but the linking failes since the kml libs
were not found. Looking for these I found them in /usr/lib, which is
in my LD_LIBRARY_PATH, so that was something odd, since they should be
found normally. A second adjustment of the .pro file is adding the

LIBS += /usr/lib/
LIBS += /usr/lib/

and now the program links and runs OK.

How is it that the header files and libraries are not automagically found?

A second question, does anyone has a link to the API of the kml
development libraries?


More information about the ubuntu-users mailing list