Hi,
I have been running and programming with 1.8.9 for a while now with no problems. This week the IDE just stopped compiling the project I've been working on. It also will not compile any program, even the stock library programs will not compile. Verbose error code below for the stock "tone_sketch_aug08b". (I replaced my user name with XXXXXXXX) I tried several new installs and deleted the Arduino15 folder. Disabled my antivirus. Any program I try to compile gives roughly the same error codes. Thanks in advance.
`__vector_7' referenced in section `.vectors' of c:/users/XXXXXXXX/downloads/arduino-1.8.9-windows/arduino-1.8.9/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5/crtatmega328p.o: defined in discarded section `.text' of Tone.cpp.o (symbol from plugin)
`__vector_16' referenced in section `.vectors' of c:/users/XXXXXXXX/downloads/arduino-1.8.9-windows/arduino-1.8.9/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5/crtatmega328p.o: defined in discarded section `.text' of wiring.c.o (symbol from plugin)
c:/users/XXXXXXXX/downloads/arduino-1.8.9-windows/arduino-1.8.9/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
Stock program below:
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
int inputPin = 5; // variable for the speaker port
int tonetime = 600;
int tonelength = 500;
int tonefreq = 250;
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
digitalWrite(ledPin, HIGH);
delay(tonetime);
tone(4,tonefreq,tonelength);
delay(100);
} else {
// turn LED off:
digitalWrite(ledPin, LOW);
noTone(4);
}
}