access to gpsd c++ wrapper classes in QT

  • I am trying to add access to gpsd on a Linux(debian) computer ... I have downloaded the source and now have
    some questions on how to get at the C++ wrapper classes that are descibed here (from the man pages):

    libgpsmm and libQgpsmm are mere wrappers over libgps. The important difference 
       between the libraries is that libgpsmm is targeted at C++ applications 
       and contained in libgps, while libQgpsmm is platform independent by using 
       QTcpSocket to connect to gpsd and shipped as an additional library due to the necessary  linking to QT. Method names are the same as the analogue C functions

    I am still somewhat new to QT creator and have so far have been using my own .so libraries .. But not
    anything from other developers. My question is , what steps do I need to do to get this code into .so
    (source object) or .a (archive) form so I can use it. I would even be happy just using any of the c++
    source and headers if it they would compile properly inside my project.
    If I try to compile their code as it tells me to in the INSTALL steps, it creates many errors which cannot
    be resolved (due to lack of any information on how to handle such errors) . I have included names
    of all 209 files at bottom of document for your convienent reference.(note: there are folders as well)
    So how can I get access to the libgpsmm or libQgpsmm wrapper using the QT creator environment?

    ais_json.c | ais_json.i | AUTHORS | bits.c | bits.h | bsd_base64.c | build.txt | cgps.1
    cgps.c | clock_gettime.c | compiler.h | | COPYING | crc24q.c | crc24q.h
    daemon.c | dbusexport.c | dgpsip-servers | driver_ais.c | driver_evermore.c
    driver_garmin.c | driver_garmin_txt.c | driver_geostar.c | driver_italk.c | driver_italk.h
    driver_navcom.c | driver_nmea0183.c | driver_nmea2000.c | driver_nmea2000.h
    driver_oncore.c | driver_proto.c | driver_rtcm2.c | driver_rtcm3.c | drivers.c
    driver_sirf.c | driver_superstar2.c | driver_superstar2.h | driver_tsip.c | driver_ubx.c
    driver_ubx.h | driver_zodiac.c | gegps | gegps.1 | geoid.c | gps.1 | gps.h | gps.xml
    gps2udp.1 | gps2udp.c | gps2udp.xml | gpscap.ini | | gpscat | gpscat.1
    gpscat.xml | gpsclient.c | gpsctl.1 | gpsctl.c | gpsctl.xml | gpsd.8 | gpsd.c
    gpsd.h-head | gpsd.hotplug | gpsd.h-tail | gpsd.php | |
    gpsd.usermap | gpsd.xml | gpsdclient.c | gpsdclient.h | gpsd_config.h | gpsdctl.8
    gpsdctl.c | gpsdctl.xml | gpsdecode.1 | gpsdecode.c | gpsdecode.xml | gpsd_json.5
    gpsd_json.c | gpsd_json.xml | gpsfake | gpsfake.1 | gpsfake.xml | gpsinit | gpsinit.8
    gpsinit.xml | gps_json.h | gps_maskdump.c | gpsmon.1 | gpsmon.c | gpsmon.h
    gpsmon.xml | gpspacket.c | gpspipe.1 | gpspipe.c | gpspipe.xml | gpsprof
    gpsprof.1 | gpsprof.xml | | gpsutils.c | gpxlogger.c | HACKING | hex.c
    INSTALL | isgps.c | json.c | json.h | | lcdgps.1 | lcdgps.c | leapseconds.cache | libgps.3 | libgps.h | | libgps.xml
    libgps_core.c | | libgps_dbus.c | libgpsd_core.c | libgps_json.c
    libgpsmm.3 | libgpsmm.cpp | libgpsmm.h | libgpsmm.xml | libgps_shm.c
    libgps_sock.c | libQgpsmm.3 | | maintainers.txt |
    matrix.c | matrix.h | monitor_garmin.c | monitor_italk.c | monitor_nmea0183.c
    monitor_oncore.c | monitor_proto.c | monitor_sirf.c | monitor_superstar2.c
    monitor_tnt.c | monitor_ubx.c | net_dgpsip.c | net_gnss_dispatch.c | netlib.c
    net_ntrip.c | NEWS | ntpshm.h | ntpshmmon.1 | ntpshmmon.c | ntpshmmon.xml
    ntpshmread.c | ntpshmwrite.c | packet.c | packet_names.h | packet_states.h
    ppsthread.c | ppsthread.h | pseudoais.c | pseudonmea.c |
    README | regress-driver | revision.h | rtcm2_json.c | rtcm3_json.c | SConstruct
    sd_socket.c | sd_socket.h | serial.c | shared_json.c | shmexport.c | sockaddr.h
    srec.5 | srec.xml | srecord.c | strfuncs.h | strl.c | subframe.c | Tachometer.c
    Tachometer.h | TachometerP.h | test_bits.c | test_float.c | test_geoid.c
    test_gpsmm.cpp | test_json.c | test_libgps.c |
    test_matrix.c | test_mktime.c | test_nmea2000 | test_packet.c | test_timespec.c
    test_trig.c | timebase.c | timebase.h | timehint.c | timespec.h
    timespec_str.c | TODO | | valgrind-suppressions | xgps
    xgps.1 | xgpsspeed | xgpsspeed.1

  • Lifetime Qt Champion


    Before anything, are you using your distribution Qt ? If so, did you check whether libQgpsmm is available for it ?

  • Hi , I am using distribution software on Ubuntu and also on an ARM architecture based computer. They were both installed using sudo apt-get install qtcreator. Both machines have a different version ( qtcreator 2.5 and qt 4.8.1) & (qtcreator 3.0 and qt 5.2.1) based on the latest update of their repositories. I do cross compiling in Eclipse but have not tried it with QT so far. I have enough stuff to figure out as it is...Hmm , I am doing a search through Github to see if I can find libQgpsmm there. Is there anywhere else I should check?
    I should mention libgpsmm.cpp and it's header are listed, and since I am writing code in cpp I can use that option. Do you think I can include all the headers and cpp files as well as all the relevant c files into a new project and then have it compile? I am going to try it this way right now to see what will happen.
    Since the daemon is already running and tested I only need the wrapper classes for the c code used to interface with it.

  • Lifetime Qt Champion

    Ubuntu already provides that library, see here

  • That looks great, I actually will need it for the ARM processor ,but I can test it out on Ubuntu first to make sure it works.
    I appreciate this a lot. For any other programmers info , you can use the software center. Go under developer tools and make a search for libgpsmm-dev ,then click to install it .
    Now I will look to see if I can find a similar method on the other ARM computer... :)

  • Lifetime Qt Champion

    Debian has it for ARM

  • You know I just was digging in there as well for the libraries. This is all looking very possible now. Still new to QT , I am becoming more enthusiastic with using it every day. Already have one project nearly ready for release :) . You know going back to C++ isn't so bad, after all...

  • Heh just tried to install on the ARM machine and it installed the version that I was trying out and then it killed off the O/S ...I see there are going to be some teething problems before I get it all working...

  • Lifetime Qt Champion

    Killed the OS ? What do you mean ?

  • It stopped the O/S from loading everything it needed on reboot. It froze it up... So I thought It would be a good time to upgrade to the newest version of the O/S .. That version is not QT Creator friendly yet.. I spent too much time just trying to install. So in the end I went back to the version I had been using. No problem getting QTCreator working with it. I kinda need to write code on one project, and experiment in this other one. So I will be looking into making multiple images of the 2 different O/S's...

  • Lifetime Qt Champion

    Was there dependencies missing ?

  • Yes , I tried a couple of quick fixes that I had found searching google to do this qtcreator install. However they did not bring in all the needed dependencies I am pretty certain. Well, I decided to set up an experimental O/S to work on that one. Meanwhile I am back to coding for a short while on another project using an earlier release of the O/S.

  • I solved this issue a little while ago. It was about getting the gpsd interface libraries to work on the arm (debian) computer. I needed to upgrade to Debian 8 since the libraries I located were for that O/S (they crashed the older O/S) . I then installed synaptic package manager and used it to install the libraries needed. Synaptic also gave me information on where the .so libraries were located so that I could use that to browse for the ones needed when adding them into the project. I selected system library (Internal, External, System ,System package) . I then was able to include the libgpsmm.h files into the header of a .cpp source file and access the gpsd from inside my code.

Log in to reply