On Sun, 12 Jul 2020 22:04:54 +0200 Sven Joachim <svenj...@gmx.de> wrote:
> I am rather surprised that it does, for I have learned that you always > need to put libraries to link with at the end of the gcc commandline, > i.e. > > gcc -Wall -ggdb -o gpsclient gpsclient.c -lm -lgps > > should work. Bingo. charles@white:~/versioned/gpsclient$ gcc -Wall -o gpsclient gpsclient.c -lm -lgps gpsclient.c:72:2: warning: #warning Setting up for API version 9.0 [-Wcpp] 72 | #warning Setting up for API version 9.0 | ^~~~~~~ charles@white:~/versioned/gpsclient$ Worked correctly. Thank you. Interesting. This is a change from Buster, gcc (Debian 9.3.0-14) 9.3.0 versus gcc (Debian 8.3.0-6) 8.3.0. I conjecture the reason is so that gcc can accommodate multiple source files on one line, each with their own libraries. Something like: gcc -Wall -o snark foo.c -la -lb -lc bar.c -lb -lc -ld -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/