|
2009-11-19
, 18:39
|
|
Posts: 516 |
Thanked: 643 times |
Joined on Oct 2009
@ Denmark/Poland
|
#2
|
extern "C" { #include <location/location-gps-device.h> #include <location/location-gpsd-control.h> }
The Following 2 Users Say Thank You to hopbeat For This Useful Post: | ||
|
2010-04-27
, 18:33
|
Posts: 13 |
Thanked: 1 time |
Joined on Apr 2010
@ Helsinki
|
#3
|
|
2010-04-27
, 18:53
|
Posts: 726 |
Thanked: 345 times |
Joined on Apr 2010
@ Sweden
|
#4
|
Hi!
I encounter a similar problem and have long been looking for an answer to it, but no success so far.
I get the same error message, even when trying it with the sample code.
I am using the Virtual Image SDK and I am writing in C, though and the headers are of course included.
Any hint on how to solve is very welcome.
ES
The Following User Says Thank You to Joorin For This Useful Post: | ||
|
2010-04-28
, 08:46
|
Posts: 13 |
Thanked: 1 time |
Joined on Apr 2010
@ Helsinki
|
#5
|
gcc -O0 -g -o helloworldwithdebiansupport main.o -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgnomevfs-2 -lgconf-2 -lgthread-2.0 -lrt -lgmodule-2.0 -ldbus-glib-1 -ldbus-1 -lpthread -lgobject-2.0 -lglib-2.0 -pthread -lhildon-1 -lhildonfm -lgtk-x11-2.0 -lgnomevfs-2 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgconf-2 -lgthread-2.0 -lrt -lgmodule-2.0 -ldbus-glib-1 -ldbus-1 -lpthread -lgobject-2.0 -lglib-2.0 -losso -ldbus-glib-1 -ldbus-1 -lpthread -lgobject-2.0 -lglib-2.0
main.o: In function `on_changed': /home/maemo/workspace/helloworld-withDebianSupport/src/main.c:79: undefined reference to `location_gpsd_control_stop' main.o: In function `start_location': /home/maemo/workspace/helloworld-withDebianSupport/src/main.c:92: undefined reference to `location_gpsd_control_start' main.o: In function `main': /home/maemo/workspace/helloworld-withDebianSupport/src/main.c:198: undefined reference to `location_gpsd_control_get_default' /home/maemo/workspace/helloworld-withDebianSupport/src/main.c:199: undefined reference to `location_gps_device_get_type' collect2: ld returned 1 exit status make[2]: *** [helloworldwithdebiansupport] Error 1 make[2]: Target `all-am' not remade because of errors. make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 *** exited with code 2
|
2010-04-28
, 09:01
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#6
|
I can't understand, why the references are not found/defined?!?Code:gcc -O0 -g -o helloworldwithdebiansupport main.o -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgnomevfs-2 -lgconf-2 -lgthread-2.0 -lrt -lgmodule-2.0 -ldbus-glib-1 -ldbus-1 -lpthread -lgobject-2.0 -lglib-2.0 -pthread -lhildon-1 -lhildonfm -lgtk-x11-2.0 -lgnomevfs-2 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgconf-2 -lgthread-2.0 -lrt -lgmodule-2.0 -ldbus-glib-1 -ldbus-1 -lpthread -lgobject-2.0 -lglib-2.0 -losso -ldbus-glib-1 -ldbus-1 -lpthread -lgobject-2.0 -lglib-2.0
-llocation
The Following User Says Thank You to nicolai For This Useful Post: | ||
|
2010-04-28
, 09:05
|
|
Posts: 1,665 |
Thanked: 1,649 times |
Joined on Jun 2008
@ Praha, Czech Republic
|
#7
|
And the errors are:Code:gcc -O0 -g -o helloworldwithdebiansupport
Code:main.o: In function `on_changed': /home/maemo/workspace/helloworld-withDebianSupport/src/main.c:79: undefined reference to `location_gpsd_control_stop'
|
2010-04-28
, 09:05
|
Posts: 13 |
Thanked: 1 time |
Joined on Apr 2010
@ Helsinki
|
#8
|
|
2010-04-28
, 09:09
|
Posts: 13 |
Thanked: 1 time |
Joined on Apr 2010
@ Helsinki
|
#9
|
What are the exact #include lines in your source file? Are you sure you link to the correct header files for location_gpsd*?
/* Includes */ #include <location/location-gps-device.h> #include <location/location-gpsd-control.h> #include <hildon/hildon-program.h> #include <gtk/gtkmain.h> #include <gtk/gtkbutton.h> #include <libosso.h> #include <string.h> #include <stdlib.h> #include "localisation.h"
src/main.c:63: error: expected ')' before '*' token src/main.c:69: error: expected ')' before '*' token src/main.c:82: error: expected ')' before '*' token src/main.c: In function 'start_location': src/main.c:90: error: 'LocationGPSDControl' undeclared (first use in this function) src/main.c:90: error: (Each undeclared identifier is reported only once src/main.c:90: error: for each function it appears in.) src/main.c:90: error: expected expression before ')' token src/main.c: In function 'main': src/main.c:188: error: 'LocationGPSDControl' undeclared (first use in this function) src/main.c:188: error: 'control' undeclared (first use in this function) src/main.c:189: error: 'LocationGPSDevice' undeclared (first use in this function) src/main.c:189: error: 'device' undeclared (first use in this function) src/main.c:197: error: 'LOCATION_TYPE_GPS_DEVICE' undeclared (first use in this function) src/main.c:200: error: 'LOCATION_METHOD_USER_SELECTED' undeclared (first use in this function) src/main.c:201: error: 'LOCATION_INTERVAL_DEFAULT' undeclared (first use in this function) src/main.c:204: error: 'on_error' undeclared (first use in this function) src/main.c:205: error: 'on_changed' undeclared (first use in this function) src/main.c:206: error: 'on_stop' undeclared (first use in this function) make[2]: Leaving directory `/home/maemo/workspace/helloworld-withDebianSupport' make[1]: Leaving directory `/home/maemo/workspace/helloworld-withDebianSupport' make[2]: *** [main.o] Error 1 make[2]: Target `all-am' not remade because of errors. make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 *** exited with code 2
|
2010-04-28
, 09:13
|
Posts: 726 |
Thanked: 345 times |
Joined on Apr 2010
@ Sweden
|
#10
|
-L/user/lib -llocation
The Following User Says Thank You to Joorin For This Useful Post: | ||
trying to compile example using:
maybe I'm tired, but I have no idea how to fix this
I'm using final SDK for Maemo 5, same effect on both armel and x86.
Hi! I'm a Maemo Greeter!
Witaj na talk.maemo.org!
Useful links for newcomers:
Użyteczne linki:
Nowi użyktownicy mówią cześć | New members say hello , Tu zaczynają nowi użytkownicy | New users start here, Podforum społeczności | Community subforum, Wiki dla początkujących | Beginners' wiki page, Maemo5 101, Często zadawane pytania | Frequently Asked Questions (FAQ), Google
Jeżeli mogę w czymś pomóc, pytaj!
If I can help with anything else, just ask!
Bored? Follow me