gcc -Wall `pkg-config --cflags glib-2.0, liblocation --libs glib-2.0, liblocation` -o gps gps.cpp
/var/tmp/cc447Dm5.o: In function `main': gps.cpp:(.text+0x2c): undefined reference to `location_gpsd_control_get_default()' gps.cpp:(.text+0x38): undefined reference to `location_gps_device_get_type()' /var/tmp/cc447Dm5.o: In function `start_location(void*)': gps.cpp:(.text+0x16c): undefined reference to `location_gpsd_control_start(_LocationGPSDControl*)' /var/tmp/cc447Dm5.o: In function `on_changed(_LocationGPSDevice*, void*)': gps.cpp:(.text+0x280): undefined reference to `location_gpsd_control_stop(_LocationGPSDControl*)'