Update: [[I have managed to build an example Akonadi client application|akonadi-client-example]].
I'm new here, I want to make a simple C++ GUI app that pops up a QCalendarWidget which [[my local Akonadi|akonadi-install]] has appointments.
I open qtcreator, create a new app, hack away for a while, then of course I get undefined references for all Akonadi symbols, since I didn't tell the build system that I'm building with akonadi. Ok.
How do I tell the build system that I'm building with akonadi? After 20 minutes of frantic looking around the internet, I still have no idea.
There is a package called libakonadi-dev
which does not seem to have anything
to do with this.
That page mentions everything about making applications with Akonadi except how
to build them.
There is a package called kdepimlibs5-dev
which looks promising: it has no
.a
files but it does have haders and cmake files. However, qtcreator is
only integrated with qmake, and I would really like the handholding of an IDE
at this stage.
I put something together naively doing just what looked right, and I managed to get an application that segfaults before main() is even called:
/*
* Copyright © 2015 Enrico Zini <enrico@enricozini.org>
*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
#include <QDebug>
int main(int argc, char *argv[])
{
qDebug() << "BEGIN";
return 0;
}
QT += core gui widgets
CONFIG += c++11
TARGET = wtf
TEMPLATE = app
LIBS += -lkdecore -lakonadi-kde
SOURCES += wtf.cpp
I didn't achieve what I wanted, but I feel like I achieved something magical and beautiful after all.
I shall now perform some haruspicy on those oscure cmake files to see if I can figure something out. But seriously, people?