Commenting out #include fails to work

Hi, the Spark Core arrived in my Xmas stocking and I’m Just feeling the ropes using the WEB based IDE and I wanted to see how libraries could be included into my apps, so I chose LiquidCrystal library.

I clicked the “include in app button” and selected my “LCD-Display.ino” previously cut and pasted from the Spark-HelloSparky.cpp.

I then tried to verify the code and had lots of errors based around not finding “LiquidCrystal.h”, and “application.h” files.

I was not sure whether I needed these “#includes” now that ‘#include “LiquidCrystal/LiquidCrystal.h”’ had automatically been added by the Spark IDE so I commented both of them out using ‘//’.

I tried to verify again, still lots of errors. I’m not one to give up so I deleted the ‘#include “application.h”’ and the code compiled clean. The ‘#include “LiquidCrystal.h’ was still in place and commented out some 43 lines further down.

I played around a bit more and found that if I changed the commented out ‘#include "application.h”’ by placing a space somewhere within it, the code would verify okay.

-----The offending piece of code commented out #include --------
// This #include statement was automatically added by the Spark IDE.
#include “LiquidCrystal/LiquidCrystal.h”
// #include “application.h”

This is obviously not a show stopper, but it did give the run around for a while, so I thought that I would at least report it.
Regards Terry

1 Like

Maybe something for @jeiden to file an issue for. :wink:

Almost certainly the preprocessor at work again.