I have an application where I would like to include an external multiline script as a const in my sketch. As far as I understand from C++11, this should work:
raw_string_literal_test.ino
const char *script =
#include "script.txt"
;
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
script.txt
R"(Line 1
Line 2
Line 3
Line 4
Line 5
Line 6)"
script.txt is placed in the same folder as raw_string_literal_test.ino
However, upon clicking Verify (selected board is Arduino/Genuino Uno, Arduino version is 1.6.12 on Mac OS 10.11.6) I get the following error:
/Users/owner/Desktop/raw_string/raw_string.ino:2:22: fatal error: script.txt: No such file or directory
#include "script.txt"
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
What am I doing incorrectly?