Open per1234 opened 6 years ago
Hi @per1234 ,
thanks for spotting this; in fact, the libclang
backend is failing to analyze a part of the library (it looks like it's the AVR specific macros, incidentally the ones making FastLed magic happen ) and thus it doesn't generate the prototypes.
I can think about a couple of solutions (maybe @cmaglie has some other):
arduino-preprocessor
fails (at least, in the meantime, just to avoid breaking people's sketches)Anyway, comping on ARM works as expected, so we can use it as a reference. The error thrown (with --output-diagnostic
) is
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
Aborted (core dumped)
in fact solve it with this code block
#include <FastLED.h>
void foo();
void setup() {
foo();
}
void loop() {}
void foo() {}
try it.
Using Arduino IDE Beta build 25 with Windows 7 64 bit
Error:
sketch_nov21a:5: error: 'foo' was not declared in this scope
void loop() {}