![]() |
2010-08-21
, 10:21
|
Posts: 180 |
Thanked: 76 times |
Joined on May 2010
|
#2
|
CONFIG += link_pkgconfig PKGCONFIG += glib-2.0 liblocation LIBS += -llocation
![]() |
2010-08-23
, 09:42
|
Posts: 10 |
Thanked: 0 times |
Joined on Aug 2010
|
#3
|
![]() |
2010-08-23
, 09:53
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#4
|
![]() |
2010-08-23
, 10:41
|
Posts: 10 |
Thanked: 0 times |
Joined on Aug 2010
|
#5
|
from locationinfowidget.cpp:1: C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:422: error: ISO C++ forbids declaration of '__declspec' with no type C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:422: warning: '__declspec' initialized and declared 'extern' C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:422: error: 'dllimport' was not declared in this scope C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:422: error: expected ',' or ';' before 'const' C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:423: error: ISO C++ forbids declaration of '__declspec' with no type C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:423: warning: '__declspec' initialized and declared 'extern' C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:423: error: redefinition of 'int __declspec' C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:422: error: 'int __declspec' previously defined here C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:423: error: 'dllimport' was not declared in this scope C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:424: error: ISO C++ forbids declaration of '__declspec' with no type C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:424: warning: '__declspec' initialized and declared 'extern' C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:424: error: redefinition of 'int __declspec' C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:422: error: 'int __declspec' previously defined here C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:424: error: 'dllimport' was not declared in this scope C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:425: error: ISO C++ forbids declaration of '__declspec' with no type C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:425: warning: '__declspec' initialized and declared 'extern' C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:425: error: redefinition of 'int __declspec' C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:422: error: 'int __declspec' previously defined here C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:425: error: 'dllimport' was not declared in this scope C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:426: error: ISO C++ forbids declaration of '__declspec' with no type C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:426: warning: '__declspec' initialized and declared 'extern' C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:426: error: redefinition of 'int __declspec' C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:422: error: 'int __declspec' previously defined here C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gutils.h:426: error: 'dllimport' was not declared in this scope In file included from C:/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/glib-2.0/glib/gasyncqueue.h:34,
TEMPLATE = app TARGET = DEPENDPATH += . INCLUDEPATH += . CONFIG += link_pkgconfig PKGCONFIG += glib-2.0 liblocation hildon-1 HEADERS += locationinfowidget.h SOURCES += locationinfowidget.cpp \ main.cpp
![]() |
2010-08-23
, 11:13
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#6
|
The Following User Says Thank You to nicolai For This Useful Post: | ||
![]() |
2010-08-23
, 11:46
|
Posts: 432 |
Thanked: 645 times |
Joined on Mar 2009
|
#7
|
The Following User Says Thank You to danielwilms For This Useful Post: | ||
![]() |
2010-08-23
, 11:58
|
Posts: 10 |
Thanked: 0 times |
Joined on Aug 2010
|
#8
|
![]() |
2010-08-23
, 12:01
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#9
|
#include <location/location-gps-device.h>
#include <location/location-location-gpsd-control.h>
Indeed, when i include those 2 on my project a lot of errors came on the compilation because the compiler can't find .h files like gtk, glib, pango, cairo etc...
So i browse my include file in the SDK and found the correct files... SO i add to my .pro INCLUDEPATH += (correct path) and some errors disapeared but it still missing some files like gdkconfig.h , glibconfig.h that doesn't appear at all in the include files...
So i am asking to find some help because that seems strange to me that we can't use the liblocation.
I am working with Windows 7 and Qt Creator so i code in C++...
Additionnal questions:
I have seen many examples code in C and python to use the camera or the gps on the N900 but it still can't be possible to use this features with the cpp libraries no?
Thanks and I hope somebody had the same problem and had solve it...