PDA

View Full Version : Error including <libnotify/notify.h>



Marwa Shams
5th August 2011, 18:39
I want to apply the simple notification example in the following link

http://www.developer.nokia.com/Community/Wiki/How_to_use_standard_Maemo_5_notifications_in_Qt_ap plications

I followed the steps and added the 2 lines in .pro

CONFIG += link_pkgconfig
PKGCONFIG += libnotify
but I have the following error when I write #include <libnotify/notify.h>

error: libnotify/notify.h: No such file or directory :(

wysota
6th August 2011, 08:52
Do you have that file in your system?

Marwa Shams
6th August 2011, 17:05
I think there is something in Qt like ".dll files" in C#
for example when i use zgraph in c# i add its dll as refrence
is there any thing to do to prevent thisi problems ??

Added after 12 minutes:


Do you have that file in your system?

yes,here->>"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\libnotify\notify.h"
when i add this line --> INCLUDEPATH +="C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include" in .pro file the error
this error is fixed but there are many errors because of the header files included in notify.h
I add the path of each header file causes an error.. and repeated many

INCLUDEPATH +="C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include"\
"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\glib-2.0"\
"C:\QtSDK\Symbian\SDKs\Symbian3Qt473\epoc32\include \stdapis\glib-2.0"\
"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\gtk-2.0"\
"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\lib\gtk-2.0\include"\
"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\cairo"\
"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\pango-1.0"\
"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\atk-1.0"

but finally i have 52 errors ..I can't solve them .. not related to header files .. Like --> error: 'goffset' was not declared in this scope

Added after 4 minutes:


Do you have that file in your system?

yes,here->>"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\libnotify\notify.h"
when i add this line --> INCLUDEPATH +="C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include" in .pro file the error
this error is fixed but there are many errors because of the header files included in notify.h
I add the path of each header file causes an error.. and repeated many

INCLUDEPATH +="C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include"\
"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\glib-2.0"\
"C:\QtSDK\Symbian\SDKs\Symbian3Qt473\epoc32\include \stdapis\glib-2.0"\
"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\gtk-2.0"\
"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\lib\gtk-2.0\include"\
"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\cairo"\
"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\pango-1.0"\
"C:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\atk-1.0"

but finally i have 52 errors ..I can't solve them .. not related to header files .. Like --> error: 'goffset' was not declared in this scope

wysota
7th August 2011, 11:19
I think you can't use pkgconfig because your environment isn't prepared to use it with freemantle (epecially since you're running Windows). For each library you need to define the paths to includes and the paths to libraries needed. So far you only defined the former.

Marwa Shams
7th August 2011, 13:03
For each library you need to define the paths to includes and the paths to libraries needed. So far you only defined the former.

OK I already included paths of all needed header files easily because i know each header file name from error bar
but the problem for me how to know the libraries needed ??
for example ---> "error: 'goffset' was not declared in this scope" .. what's the lib includes this type ??

wysota
7th August 2011, 13:24
Use the LIBS variable in the project file. As for goffset, it's likely a glib routine but you can google it yourself.