kwarek / gr260dl

Automatically exported from code.google.com/p/gr260dl
GNU General Public License v2.0
0 stars 0 forks source link

Fail to compile on MacOS #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

I am using a Mac, every time I have to open windows to download tracks from my 
GPSport260 and tag photos. I tried to compile the code on the Macbook but 
failed with the following message:

gcc -O2 -W -Wall -ggdb  -o gr260dl gr260dl.c
gr260dl.c: In function ‘dumpWaypoints’:
gr260dl.c:295: warning: format ‘%2d’ expects type ‘int’, but argument 2 
has type ‘long unsigned int’
gr260dl.c:295: warning: format ‘%2d’ expects type ‘int’, but argument 2 
has type ‘long unsigned int’
gr260dl.c: In function ‘main’:
gr260dl.c:350: error: nested functions are disabled, use -fnested-functions to 
re-enable
gr260dl.c:527: error: ‘B921600’ undeclared (first use in this function)
gr260dl.c:527: error: (Each undeclared identifier is reported only once
gr260dl.c:527: error: for each function it appears in.)
make: *** [gr260dl] Error 1

I am running on MacOS X Lion with Xcode 4.3.2, with a Macport 2.0.4 framework.

Thanks for your efforts writing the code and I can compile it on a Fedora 16. 
It will be great if you could get it run on a Mac. Thank you.

Original issue reported on code.google.com by niuwensh...@gmail.com on 11 Apr 2012 at 3:02

GoogleCodeExporter commented 9 years ago
Hi,

I managed to compile with the following code modification:

13c13
< #include <libusb-1.0/libusb.h>
---
> //#include <libusb-1.0/libusb.h>
292c292
<           printf("%2zd: %s %8.6f %8.6f %3d %2d %3u %2u %1d %5d %5d %5d %5d %u\n",
---
>           printf("%2d: %s %8.6f %8.6f %3d %2d %3u %2u %1d %5d %5d %5d %5d %u\n",
416c416
<                  "\t-i</dev/cu.usbserial> read from device\n"
---
>                  "\t-i</dev/ttyUSB?> read from device\n"
527c527
<                       set_speed(hin,&nterm,B115200);
---
>                       set_speed(hin,&nterm,B921600);
616c616
<       set_speed(hin,&nterm,B115200);
---
>       set_speed(hin,&nterm,B921600);

But when running the command, there is only this output:

GR260 found.
Firmware version: 2.01

and it seems to hang. It has to be killed from another terminal. Trying to use 
CTRL-C to terminate the program causes the machine to hang, which does not 
respond to keyboard or mouse. 

Any hint to trouble shoot?

Original comment by niuwensh...@gmail.com on 13 Jun 2013 at 12:03