Quick Question

hello this is my first project. it is the spaceship interface project from the book the arduino came with. i managed to debug a lot of things but now when i verify it gives me this and i have no idea what it is trying to tell me.

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: WInterrupts.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: hooks.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring_analog.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring_digital.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring_pulse.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring_shift.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: CDC.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial0.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial1.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial2.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial3.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: IPAddress.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: PluggableUSB.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: Print.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: Stream.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: Tone.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: USBCore.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: WMath.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: WString.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: abi.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: main.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: core/new.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so: error loading plugin: dlopen(/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so, 2): Symbol not found: _environ Referenced from: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so Expected in: /usr/lib/libSystem.B.dylib

collect2: error: ld returned 1 exit status exit status 1 Error compiling for board Arduino/Genuino Uno.

Do simple programs such as the Blink example work ? Which Arduino board do you have ?

show your code. which version of the IDE?

i have the arduino starter kit. the codes that came with the arduino come up with the same thing. here is my project. The IDE is 1.6.11

int switchState = 0;

void setup() {
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(2, INPUT);
}
void loop() {
int swichState = digitalRead(2);
// comment
if (switchState == LOW) {
// the butten is not pressed
digitalWrite(3, HIGH); // yellow led
digitalWrite(4, LOW); // red led
digitalWrite(5, LOW); // blue led
}
else { // the button is pressed
digitalWrite(3, LOW); // yellow led
digitalWrite(4, LOW); // red led
digitalWrite(5, HIGH); // blue led
delay(250); // wait for a quarter second
// toggle the leds
digitalWrite(4, HIGH); // yellow led
digitalWrite(5, LOW); // red led
delay(250); // wait for a quarter second
}
} // go back to the begining of the loop

Do a Google for 'arduino lto'. One hit that might help is https://forum.arduino.cc/index.php?topic=415801.0

User pert is very knowledgeable in this area.

please add code tags around your code so that it looks like this:

int switchState = 0;

void setup() {
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(2, INPUT);
}
void loop() {
  int swichState = digitalRead(2);
  // comment
  if (switchState == LOW) {
    // the butten is not pressed
    digitalWrite(3, HIGH); // yellow led
    digitalWrite(4, LOW); // red led
    digitalWrite(5, LOW); // blue led
  }
  else { // the button is pressed
    digitalWrite(3, LOW); // yellow led
    digitalWrite(4, LOW); // red led
    digitalWrite(5, HIGH); // blue led
    delay(250); // wait for a quarter second
    // toggle the leds
    digitalWrite(4, HIGH); // yellow led
    digitalWrite(5, LOW); // red led
    delay(250); // wait for a quarter second
  }
} // go back to the begining of the loop

(which compiles perfectly fine)

for that your select your text and click on the little </> button in the toolbar or alternatively you type

[code]
your code goes here
[/code]
  int switchState = 0;
  
  void setup() {
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(2, INPUT);
  }
  void loop() {
  int swichState = digitalRead(2);
  // comment
  if (switchState == LOW) {
  // the butten is not pressed
  digitalWrite(3, HIGH); // yellow led
  digitalWrite(4, LOW); // red led
  digitalWrite(5, LOW); // blue led
  }
  else { // the button is pressed
  digitalWrite(3, LOW); // yellow led
  digitalWrite(4, LOW); // red led
  digitalWrite(5, HIGH); // blue led
  delay(250); // wait for a quarter second
  // toggle the leds
  digitalWrite(4, HIGH); // yellow led
  digitalWrite(5, LOW); // red led
  delay(250); // wait for a quarter second
  }
  } // go back to the begining of the loop
int swichState = digitalRead(2);
  // comment
  if (switchState

swichState is not the same as switchState. Spelling and attention to detail are really important.

Thanks for the spelling catch, but unfortunately I am still getting the error message. It even happens with Blink, which I grab straight from the examples. My error code for Blink is:

Arduino: 1.6.10 (Mac OS X), Board: "Arduino/Genuino Uno"

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: WInterrupts.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: hooks.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring_analog.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring_digital.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring_pulse.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring_shift.c.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: CDC.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial0.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial1.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial2.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial3.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: IPAddress.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: PluggableUSB.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: Print.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: Stream.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: Tone.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: USBCore.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: WMath.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: WString.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: abi.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: main.cpp.o: plugin needed to handle lto object /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: /var/folders/jb/6jw8hh6s5p1820lznpx0mfgm0000gq/T/buildd5ae82e677127ac286f51de66781d807.tmp/core/new.cpp.o: plugin needed to handle lto object Linking everything together... "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc" -w -Os -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "/var/folders/jb/6jw8hh6s5p1820lznpx0mfgm0000gq/T/buildd5ae82e677127ac286f51de66781d807.tmp/Blink.ino.elf" "/var/folders/jb/6jw8hh6s5p1820lznpx0mfgm0000gq/T/buildd5ae82e677127ac286f51de66781d807.tmp/sketch/Blink.ino.cpp.o" "/var/folders/jb/6jw8hh6s5p1820lznpx0mfgm0000gq/T/buildd5ae82e677127ac286f51de66781d807.tmp/core/core.a" "-L/var/folders/jb/6jw8hh6s5p1820lznpx0mfgm0000gq/T/buildd5ae82e677127ac286f51de66781d807.tmp" -lm /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so: error loading plugin: dlopen(/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so, 2): Symbol not found: _environ Referenced from: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so Expected in: /usr/lib/libSystem.B.dylib

collect2: error: ld returned 1 exit status exit status 1 Error compiling for board Arduino/Genuino Uno.

what version of Mac OS do you have? have you installed a version of Java?

hello this is my first project. it is the spaceship interface project from the book the arduino came with.

A book, you say? And did this book have a DVD with a copy of the arduino IDE?