[maemo-developers] problem using osso-abook in Qt/MADDE

From: Nicolai Hess nicolaihess at web.de
Date: Thu Nov 4 01:47:34 EET 2010
2010/11/3 Roman Morawek <lists at morawek.at>

> Hello,
>
> I try to use the native Maemo address book selection dialog in a Qt
> application.
>
> I followed the information at
>
> http://wiki.forum.nokia.com/index.php/How_to_use_native_Maemo5_contacts_dialogs
> .
>
> However, as I add
>  CONFIG += link_pkgconfig
>  PKGCONFIG += gtk+-2.0 libosso-abook-1.0
> to the Qt project file and
>  #include <libosso-abook/osso-abook.h>
> to some source file I get the following error:
>
> In file included from
>
> C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/include/gtk-2.0/gtk/gtk.h:47,
>                 from
>
> C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/include/libosso-abook-1.0/libosso-abook/osso-abook-list-store.h:12,
>                 from
>
> C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/include/libosso-abook-1.0/libosso-abook/osso-abook-group.h:15,
>                 from
>
> C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/include/libosso-abook-1.0/libosso-abook/osso-abook-all-group.h:13,
>                 from
>
> C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/include/libosso-abook-1.0/libosso-abook/osso-abook.h:15,
>                 from usernotifier.cpp:33:
>
>
> C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/include/gtk-2.0/gtk/gtkbindings.h:79:
> error: expected unqualified-id before 'protected'
>
>
> C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/include/gtk-2.0/gtk/gtkbindings.h:79:
> error: expected ';' before 'protected'
>
> make: Leaving directory
> `/c/Users/roman/Documents/privat/projects/2010/babyphone/svn/trunk/src'
> make: *** [usernotifier.o] Error 1
>
>
> I am using QtCreator on Windows, thus MADDE-0.7.48: 20101021-1348.
>
> How can I resolve this?
>
> Thanks a lot for your support,
> Roman
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>

where did you add
#include <libosso-abook/osso-abook.h>

be sure it is the first line and prior to any qtinclude. For example in
qossoabookdialog.h
(from
http://wiki.forum.nokia.com/index.php/How_to_use_native_Maemo5_contacts_dialogs
.):

#include <libosso-abook/osso-abook.h>
#include <QObject>
#include <QStringList>
....
works, and:

#include <QObject>
#include <QStringList>
#include <libosso-abook/osso-abook.h>
...
does not work (it gives the same error as yours).

nicolai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.maemo.org/pipermail/maemo-developers/attachments/20101104/00530081/attachment.htm>
More information about the maemo-developers mailing list