Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register


Compiling the decode c example


Total Posts: 1

Joined 2014-04-09



New user here and first time post. Bear with me...

I do not have visual studio to run the vc project file and I need to compile the example manually using either Eclipse on Win7 or gcc on Debian.

I've tried the seemingly straightforward approach of creating C project in Eclipse by including all the fit*.c and fit*.h files and the decode.c file. Run the Build Project command and watch it blow up. I've tried manually compiling using gcc on Debian to no avail. My C is really rusty but it's a lot better than my C++ or JAVA. I'm probably making a foolish mistake and hope someone can point it out to soon. It's difficult to get started with the SDK without an example to play with.

The end goal is to be able to run the decode through the command line.


[EDIT]: I was getting a little cross-eyed when I wrote this. If anyone else if trying to compile, here is what worked for me (this generates an executable called decode):

gcc decode.c fit_convert.c fit_crc.c fit.c fit_example.-o decode 

This seems correct as I'm getting expected error handling when no file is present:
Testing file conversion using (nullfile...
Error opening file (null)

Total Posts: 91

Joined 2012-10-12


I haven't tried to do what you are describing but as far as I know it should be possible. What happens if you run your binary on one of the example .FIT files in the SDK archive?

Java may still be a good option for you, it should be straightforward to get it to run in the Eclipse debugger so you can step through the sample apps.