linux - Compile a gpsd client in C++ -
i'm attempting compile client program of gpsd using following command:
g++ gpsclient.cpp -o gpsclient $(pkg-config --cflags --libs libgps)
the source code begins that
#include <libgpsmm>
the error following:
package libgpsmm not found in pkg-config search path.
answering in case else encounters issue.
the proper header file include is, suggested in comments:
#include <libgpsmm.h>
pkg-config should able find proper search path, assuming gpsd (and/or depending on os, libgps-dev or variants thereof) installed.
there's gist on github use base interacting gpsd clients in c++ here: example c++ gpsd program using libgpsmm
it has example compile command (adapt clang or other if needed):
g++ -wall -std=c++14 -pedantic $(pkg-config --cflags --libs libgps) gpsd-example.cpp -o gpsd-example
Comments
Post a Comment