我是新來的Qt,和我一直在考慮這個任務Retreving Contry位置使用GPS ...Qt中
使用GPS檢測的國家 - 在一個文本框來顯示它。
那麼,因爲我是新來的,我不知道如何做這樣的事情。我開始通過搜索在互聯網上
我在這裏結束了:http://www.developer.nokia.com/Community/Wiki/File:Qt_for_Maemo_Location_Example.zip
所以我下載的代碼並運行它,噸錯誤的出現
..\liblocation\locationinfowidget.cpp:1:34: error: hildon/hildon-banner.h: No such file or directory
In file included from ..\liblocation\locationinfowidget.cpp:5:
..\liblocation\/locationinfowidget.h:18: error: 'LocationGPSDeviceFix' has not been declared
..\liblocation\/locationinfowidget.h:20: error: 'LocationGPSDeviceStatus' has not been declared
..\liblocation\/locationinfowidget.h:23: error: 'LocationGPSDevice' has not been declared
..\liblocation\/locationinfowidget.h:23: error: 'gpointer' has not been declared
..\liblocation\/locationinfowidget.h:24: error: 'LocationGPSDevice' has not been declared
..\liblocation\/locationinfowidget.h:24: error: 'gpointer' has not been declared
..\liblocation\/locationinfowidget.h:25: error: 'LocationGPSDevice' has not been declared
..\liblocation\/locationinfowidget.h:25: error: 'gpointer' has not been declared
..\liblocation\/locationinfowidget.h:33: error: ISO C++ forbids declaration of 'LocationGPSDevice' with no type
..\liblocation\/locationinfowidget.h:33: error: expected ';' before '*' token
..\liblocation\/locationinfowidget.h:34: error: ISO C++ forbids declaration of 'LocationGPSDControl' with no type
..\liblocation\/locationinfowidget.h:34: error: expected ';' before '*' token
..\liblocation\locationinfowidget.cpp: In constructor 'LocationInfoWidget::LocationInfoWidget(QWidget*)':
..\liblocation\locationinfowidget.cpp:33: error: 'control' was not declared in this scope
..\liblocation\locationinfowidget.cpp:33: error: 'location_gpsd_control_get_default' was not declared in this scope
..\liblocation\locationinfowidget.cpp:35: error: 'location_gpsd_control_start' was not declared in this scope
..\liblocation\locationinfowidget.cpp:37: error: 'device' was not declared in this scope
..\liblocation\locationinfowidget.cpp:37: error: 'LocationGPSDevice' was not declared in this scope
..\liblocation\locationinfowidget.cpp:37: error: expected primary-expression before ')' token
..\liblocation\locationinfowidget.cpp:37: error: expected ';' before 'g_object_new'
..\liblocation\locationinfowidget.cpp:40: error: 'G_CALLBACK' was not declared in this scope
..\liblocation\locationinfowidget.cpp:40: error: 'g_signal_connect' was not declared in this scope
..\liblocation\locationinfowidget.cpp: In destructor 'virtual LocationInfoWidget::~LocationInfoWidget()':
..\liblocation\locationinfowidget.cpp:50: error: 'device' was not declared in this scope
..\liblocation\locationinfowidget.cpp:51: error: 'g_object_unref' was not declared in this scope
..\liblocation\locationinfowidget.cpp:53: error: 'control' was not declared in this scope
..\liblocation\locationinfowidget.cpp:54: error: 'location_gpsd_control_stop' was not declared in this scope
..\liblocation\locationinfowidget.cpp: At global scope:
..\liblocation\locationinfowidget.cpp:57: error: variable or field 'updateStatus' declared void
..\liblocation\locationinfowidget.cpp:57: error: 'LocationGPSDeviceStatus' was not declared in this scope
mingw32-make[1]: *** [debug/locationinfowidget.o] Error 1
mingw32-make: *** [debug] Error 2
所以我在做這一切錯了嗎?有沒有更簡單的方法來做這樣的事情?請具體,我將不勝感激
您需要安裝SDK - 您沒有正確安裝SDK。 –
更具體請馬上使用Qt Creator .... –