Skip to content

Precompiler does not put function declarations near top #81

@ffissore

Description

@ffissore

From @hpvanriemsdijk on December 9, 2015 10:38

When, for example, I try to compile the example "ColorPalette" from the Fastled libary on my teensy 3.2 using arduino IDE 1.6.6 + TeensyDuino 1.26, I get the following errors:

Arduino: 1.6.6 (Windows 10), TD: 1.26, Board:"Teensy 3.2 / 3.1, Serial, 96 MHz optimized (overclock), US English"

In file included from D:\4.Development\1. Arduino\libraries\FastLED\examples\ColorPalette\ColorPalette.ino:1:0:
D:\4.Development\1. Arduino\libraries\FastLED/FastLED.h:12:2: warning: #warning FastLED version 3001000 (Not really a warning, just telling you here.) [-Wcpp]
#warning FastLED version 3001000  (Not really a warning, just telling you here.)
^
D:\4.Development\1. Arduino\libraries\FastLED\examples\ColorPalette\ColorPalette.ino: In function 'void loop()':
ColorPalette:50: error: 'ChangePalettePeriodically' was not declared in this scope
ChangePalettePeriodically();
^
ColorPalette:55: error: 'FillLEDsFromPaletteColors' was not declared in this scope
FillLEDsFromPaletteColors( startIndex);
^
D:\4.Development\1. Arduino\libraries\FastLED\examples\ColorPalette\ColorPalette.ino: In function 'void ChangePalettePeriodically()':
ColorPalette:90: error: 'SetupPurpleAndGreenPalette' was not declared in this scope
if( secondHand == 20)  { SetupPurpleAndGreenPalette();             currentBlending = LINEARBLEND; }
^
ColorPalette:91: error: 'SetupTotallyRandomPalette' was not declared in this scope
if( secondHand == 25)  { SetupTotallyRandomPalette();              currentBlending = LINEARBLEND; }
^
ColorPalette:92: error: 'SetupBlackAndWhiteStripedPalette' was not declared in this scope
if( secondHand == 30)  { SetupBlackAndWhiteStripedPalette();       currentBlending = NOBLEND; }
^
ColorPalette:93: error: 'SetupBlackAndWhiteStripedPalette' was not declared in this scope
if( secondHand == 35)  { SetupBlackAndWhiteStripedPalette();       currentBlending = LINEARBLEND; }

Based on research (Fastled Issue) by the maintainer of the Fastled Libary it seems the Precompiler does not put function declarations near top for Teensy, Arduino Zero and Arduino Due.

Copied from original issue: arduino/Arduino#4278

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions