* On 2013 13 Dec 11:58 -0600, Mike Waters wrote: > > ==%== > > #include <stdio.h> > > #include <hamlib/rotator.h> > > > > int main(int argc, char ** argv) { > > double s1long, s1lat, s2long, s2lat; > > char s1qra[] = "EM37cg"; > > char s2qra[] = "jn97om"; > > double dist = 1000, az = 90; > > > > locator2longlat(&s1long, &s1lat, s1qra); > > locator2longlat(&s2long, &s2lat, s2qra); > > > > printf("W0BTU coords: lat: %f lon: %f\n", s1lat, s1long); > > printf("HA2OS coords: lat: %f lon: %f\n", s2lat, s2long); > > > > qrb(s1long, s1lat, s2long, s2lat, &dist, &az); > > > > printf("distance between W0BTU and HA2OS: %f km, dir: %f\n", dist, az); > > return 0; > > } > > ==%== > > > > You can compile that code with this command: > > > > gcc -Wall qrasrc.c -lhamlib > > > > It didn't work. Here is the gcc output: > > mike@mike-ubuntu:~/local/share/tlf/tlf-devel$ sudo gcc -Wall gridtest.c > -lhamlib > [sudo] password for mike:
Just as info, sudo is not required to run gcc in your home directory. > gridtest.c:1:1: error: expected identifier or ‘(’ before ‘==’ token > In file included from /usr/include/stdio.h:75:0, > from gridtest.c:2: I'm guessing that you left the lines that have "==%==" in the file. This should not be there, so delete those lines. Try it without those lines and try it again. 73, de Nate >> -- "The optimist proclaims that we live in the best of all possible worlds. The pessimist fears this is true." Ham radio, Linux, bikes, and more: http://www.n0nb.us _______________________________________________ Tlf-devel mailing list Tlf-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tlf-devel