The line numbers correspond to the ones in the sample application. Nothing in the sample application has been modified. ‘setup’ is on line 39 in the ‘Blink an LED’ sample application, and ‘loop’ is on line 55 in the ‘Blink an LED’ sample application. Lines 6 and 10 are comments in the ‘Blink an LED’ sample application.
Have you got the most recent version of Particle Dev?
Have you definetly saved the file before build, since only the saved versions get used for compile. If you alter your code, you see one version, but the errors may refer to the saved version.
Additionaly as I recall, there was a time where the preprocessor seemd to treat commented lines as active code.
I thought this issue was long gone, but who knows.
Some work arounds were to add a blank first line, or use #pragma SPARK_NO_PREPROCESSOR
You could also try a block comment /* */ in addition to the line comment //
With your assistance and some intuition, the issue has been solved. Here is what happened.
I am running Particle Dev version 0.0.24.
Initially, I actually did have more than one .ino file in the build directory, so I moved the .ino file of interest to its own folder.
Though I put the .ino file of interest in its own build directory, the compiling issue did not go away (This could be based on some residual state in the cloud from the previous compile. I’m not 100% sure.).
To rectify, I uninstalled Particle Dev and then reinstalled it.
After 4., I made a directory with only the .ino file of interest contained in it.
Based on the fresh install of 4., the compile and flashing completed successfully.