Compiling against gpsd - linking fails

Hi all,

I'm trying to compile a tool that uses gps.h, but my compilation seems to fail each time when it tries to link to libgps. The error message I receive is:

/opt/openwrt-sdk/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-7.3.0_musl_eabi/bin/../lib/gcc/arm-openwrt-linux-muslgnueabi/7.3.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: cannot find -lgps

This is the command I'm compiling with:

arm-openwrt-linux-gcc -o ./bin/eagle src/main.c -I./src -I/opt/openwrt-sdk/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/include -static -L/opt/openwrt-sdk/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/lib  -lpthread -lgps

Basic code for reference:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <gps.h>

int main(void)
  int rc;
  struct gps_data_t gps_data;
  if ((rc = gps_open("localhost", "2947", &gps_data)) == -1)
    printf("code: %d, reason: %s\n", rc, gps_errstr(rc));
    return 1;
  gps_stream(&gps_data, WATCH_ENABLE | WATCH_JSON, NULL);

  return 0;

And some directory listings in my toolchain - as far as I can tell, libgps has compiled successfully:

# ls -lah /opt/openwrt-sdk/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/include/ | grep gps

-rw-rw-r-- 1 root root  80K Sep  7  2017 gps.h

# ls -lah /opt/openwrt-sdk/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/lib/ | grep gps

lrwxrwxrwx 1 root root   16 Oct 17 18:46 ->
lrwxrwxrwx 1 root root   16 Oct 17 18:46 ->
-rwxr-xr-x 1 root root 101K Oct 17 18:46

Many thanks in advance for any help.