[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about gpsd library/linking for an external gpsd client?

From: Curtis Olson
Subject: Question about gpsd library/linking for an external gpsd client?
Date: Thu, 4 Jun 2020 11:20:34 -0500

Here is my dumb question for today:

I would like to write a simple gpsd client, but I would like the code to be completely outside of the gpsd source tree and built completely independently.

Does 'scons install' for gpsd install enough libs/headers for me to compile an external, independent client?

When I look at my system, I see that is installed in /usr/local/lib.  There is a bunch of python stuff installed (which is cool, but I'm ignoring for now.)  I see the gps.h file in /usr/local/include.

But when I try to do something 'simple' like compile gpxlogger.c outside of the gpsd devel tree I get missing symbols for things like gps_open(), gps_close(), etc.  I tried linking with -lgpsdpacket because that is the only library that got installed (as far as I can tell) but that doesn't seem to be the right thing:

gcc -o gpxlogger gpxlogger.c -lgpsdpacket

It seems like all the supporting libs for writing client code are compiled staticly, exist only in the gpsd source tree, and are never installed system wide?  Did I make a mistake in running "scons install"?  Is there additional scons commands to run to install client devel libraries?  Way back in the way back I wrote a gpsd client using pure socket calls (no gpsd libs at all).  Would that approach still work?  Is there a recommended approach for what I'm trying to do?  I feel like I've missed something here, so I'm taking a break from exploring the code and build system and asking the dumb questions.


Curtis Olson
University of Minnesota, Aerospace Engineering and Mechanics, UAS Lab

reply via email to

[Prev in Thread] Current Thread [Next in Thread]