1

Topic: Made changes, now won't compile

I had a previously working project (Teensy 3.2) that I made some cosmetic changes to, now it won't compile, and the errors I am getting are flagged up in the RemoteXY configuration copied from the online editor.

I am completely bemused by this error, and don't understand how it can have been introduced by any code changes I have made in the body code.

I have checked that I have library RemoteXY installed (Version 3.1.9)

These are the errors flagged...

In file included from C:\Users\Dave\Documents\Arduino Projects\pRojeCt_BEAT\pRojeCt_BEAT.ino:15:0:
Remote_XY.hpp:6: error: macro names must be identifiers
 #define REMOTEXY_MODE__HARDSERIAL
        ^
Remote_XY.hpp:8: error: #include expects "FILENAME" or <FILENAME>
 #include <RemoteXY.h>
         ^
Remote_XY.hpp:11: error: macro names must be identifiers
 #define REMOTEXY_SERIAL Serial1
        ^
Remote_XY.hpp:12: error: macro names must be identifiers
 #define REMOTEXY_SERIAL_SPEED 9600
        ^
macro names must be identifiers

My RemoteXY config is in a separate tab called "RemoteXY.hpp", which is where all the errors are being called out. This file is included in my body code, which used to work fine, and is the way I normally do things.

// include the RemoteXY setup
#include "Remote_XY.hpp" 

Any help would be appreciated ...

2B, or not 2B, that is the pencil ...

2

Re: Made changes, now won't compile

OK, so I have tracked down the cause of these errors.

Everything was compiling OK up to the point where I copy/pasted a new RemoteXY configuration block of code.

The problem is being caused by there being an "incorrect" white-space after the compiler directives #include & #define.

I noticed that the IDE wasn't colouring them as it normally does, and simply back-spacing the "spaces" and replacing them with proper spaces allowed the IDE to see them as directives.

I verified this is the issue by opening an older project, and it compiled perfectly. I then replaced the RemoteXY configuration by copy/pasting from the online editor, and it didn't compile.

I don't know what has caused this, has the RemoteXY code generator been changed and it is now putting the "wrong" kind of space character ?

2B, or not 2B, that is the pencil ...