Reloading Tinker code onto Core

Having trouble reloading the original Tinker code onto my Core. Per the Tinker documentation, I’ve grabbed the code linked to at this url - https://github.com/spark/core-firmware/blob/master/src/application.cpp.

Pasting that into the editor within the Build application however I’m getting the following error when trying to verify the code:

the_user_app.cpp:26:6: error: previous declaration of 'void setup()' with 'C++' linkage
In file included from ../inc/spark_wiring.h:31:0,
from ../inc/application.h:29,
from the_user_app.cpp:27:
../inc/spark_utilities.h:116:35: error: conflicts with new declaration with 'C' linkage
the_user_app.cpp:27:6: error: previous declaration of 'void loop()' with 'C++' linkage
In file included from ../inc/spark_wiring.h:31:0,
from ../inc/application.h:29,
from the_user_app.cpp:27:
../inc/spark_utilities.h:117:34: error: conflicts with new declaration with 'C' linkage
make: *** [the_user_app.o] Error 1

Try removing #include “application.h”

1 Like

Bingo.

Thanks for the help.

1 Like

No problem.

I suspect the Web IDE adds this #include in automatically, so putting it in your code too confused things a little.

I’m surprised though, would have thought that the #ifndef would have taken care of that.

As the code for the Web IDE isn’t on github, that’s just a guess, but I’m pleased it worked.

1 Like