I have 3 files in my Sketch directory:
Sketch.ino
Foo.h
Bar.h
Sketch.ino contains this:
#include "Foo.h"
void setup() {}
void loop() {}
Foo.h contains this:
#pragma once
#include "Bar.h"
Bar.h contains this:
#pragma once
Till now I used arduino-cli version 0.16.0 for building and everything was ok.
Now I moved to arduino-cli 0.28.0 and the build fails telling me this:
In file included from D:\Home\MyRepos\ChickenHouse\Sketch\Foo.h:2:0,
from D:\Home\MyRepos\ChickenHouse\Sketch\Sketch.ino:1:
D:\Home\MyRepos\ChickenHouse\Sketch\Bar.h:1:1: error: stray '\357' in program
#pragma once
^
D:\Home\MyRepos\ChickenHouse\Sketch\Bar.h:1:2: error: stray '\273' in program
#pragma once
^
D:\Home\MyRepos\ChickenHouse\Sketch\Bar.h:1:3: error: stray '\277' in program
#pragma once
^
D:\Home\MyRepos\ChickenHouse\Sketch\Bar.h:1:4: error: stray '#' in program
#pragma once
^
D:\Home\MyRepos\ChickenHouse\Sketch\Bar.h:1:5: error: 'pragma' does not name a type; did you mean '_Pragma'?
#pragma once
^~~~~~
_Pragma
Does anybody know why the newer version has problem with #pragma once or what's going on?