Skip to content

Instantly share code, notes, and snippets.

@novogrammer
Last active August 29, 2015 14:14
Show Gist options
  • Save novogrammer/fc69d159be9659c41a15 to your computer and use it in GitHub Desktop.
Save novogrammer/fc69d159be9659c41a15 to your computer and use it in GitHub Desktop.
Arduino IDE inserts forward declaration
/*
#line 1 "mySketch.ino"
*/
#include <SPI.h>
/*
#include "Arduino.h"
void foo(TwoWire bar);
void setup();
void loop();
#line 2
*/
int a=0;
#include <Wire.h>
int b=0;
void foo(TwoWire bar){
}
void setup(){
}
void loop(){
}
//mySketch:3: error: variable or field 'foo' declared void
//mySketch:3: error: 'TwoWire' was not declared in this scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment