It has been common place in my group to create a function called mseconds for our robots. However, this year the compiler says that it already has mseconds defined. So we use it in out code as is without defining it and it works out fine in the kiss-c compiler. But when the CBC tries to compile the code, it brings up an error saying it doesn't recognize mseconds. We are able to work around this by just using a different name, but i was wondering if there was a way to fix this problem otherwise and if any of the kipr staff knew about this.
The GCC compiler used on the computer and CBC, while similar, is not identical. There is no way for KIPR to fix this. Using a different name is your best option.
Best of wishes,
Braden McDorman
"When you do things right, people won't know you've done anything at all."
You might try conditional compilation. GCC on PC should have different #defines set than GCC on the Chumby. In particular, I would look for an ARM Linux define. A quick google reveals that this may work, although I haven't tried it.
#ifdef __arm__
-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS
thanks guys.