gpsd-dev
[Top][All Lists]
Advanced

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

Re: ✘https://gpsd.io/gpsd-client-example-code.html


From: Andreas B
Subject: Re: ✘https://gpsd.io/gpsd-client-example-code.html
Date: Tue, 9 Mar 2021 12:09:20 +0100

James,

You have all the reasons in the world to incinerate me. I should not
have sent that email.

Thanks for your help though!

Best,
Andreas

On Tue, Mar 9, 2021 at 11:46 AM James Browning <jamesb.fe80@gmail.com> wrote:
>
> On Tue, Mar 9, 2021, 1:54 AM Andreas B <panden@gmail.com> wrote:
>>
>> Gary,
>>
>> I do _not_ know alot about C, so forgive my ignorance.
>>
>> When I try to compile I get this:
>>
>> ----
>> $ gcc example_gpsd_client.c
>> /usr/bin/ld: /tmp/ccUgbOEX.o: in function `main':
>> example_gpsd_client.c:(.text+0x31): undefined reference to `gps_open'
>> /usr/bin/ld: example_gpsd_client.c:(.text+0x64): undefined reference
>> to `gps_stream'
>> /usr/bin/ld: example_gpsd_client.c:(.text+0x82): undefined reference
>> to `gps_read'
>> /usr/bin/ld: example_gpsd_client.c:(.text+0x1d2): undefined reference
>> to `gps_waiting'
>> /usr/bin/ld: example_gpsd_client.c:(.text+0x1f3): undefined reference
>> to `gps_stream'
>> /usr/bin/ld: example_gpsd_client.c:(.text+0x202): undefined reference
>> to `gps_close'
>> collect2: error: ld returned 1 exit status
>
>
> Qed people never read comment and the toolchain can not use them...
>
> Tldr: add (-lm -lgps -o binary_name) without parentheses just like it says on 
> the second line of the source file.



reply via email to

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