Sketch compile error when file copied to new computer

int Light = 12 ; //HERO board pin 12

void setup() {
  // initialize a digital pin as an outpu, then set its value to HIGH (5 volts)

pinMode(Light, OUTPUT);
digitalWrite(Light, HIGH);

}

void loop() {
  // the code here will run repeTWEDLY UNTIL HERO IS TURNED OFF:



//this is the "S" sequence dots ...
digitalWrite(Light, LOW);
delay(300);
digitalWrite(Light, HIGH);
delay(300);

digitalWrite(Light, LOW);
delay(300);
digitalWrite(Light, HIGH);
delay(300);

digitalWrite(Light, LOW);
delay(300);
digitalWrite(Light, HIGH);
delay(300);

digitalWrite(Light, LOW);
delay(1000);


// This stopped working when I copied the file to a different computer. 
 
// this is the "O" sequence dashes - - - 
digitalWrite(Light, LOW);
delay(500);
digitalWrite(Light, HIGH);
delay(1000);

digitalWrite(Light, LOW);
delay(500);
digitalWrite(Light, HIGH);
delay(1000);

digitalWrite(Light, LOW);
delay(500);
digitalWrite(Light, HIGH);
delay(1000);

digitalWrite(Light, LOW);
delay(1000);



//this is the "S" sequence dots ...
digitalWrite(Light, LOW);
delay(300);
digitalWrite(Light, HIGH);
delay(300);

digitalWrite(Light, LOW);
delay(300);
digitalWrite(Light, HIGH);
delay(300);

digitalWrite(Light, LOW);
delay(300);
digitalWrite(Light, HIGH);
delay(300);

digitalWrite(Light, LOW);
delay(2000);

fork/exec /Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++: no such file or directory

Compilation error: fork/exec /Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++: no such file or directory

It looks like the Arduino IDE was not properly installed. Try reinstalling.

You may need to reinstall the boards package for the target MCU. What is a "HERO"?

If you look at the error code it is giving you the path it is looking in for a file and then telling you it is not there. You get to fix it by placing the needed file in that location.

I reinstalled but same:
fork/exec /Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++: no such file or directory

Compilation error: fork/exec /Users/mark/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++: no such file or directory

Hi @mcreedon. Which version of Arduino IDE are you using (e.g., "2.0.1")? The version is shown on the window title bar and also in the Help > About dialog.

I ask for this information because I want to give you the appropriate instructions for the IDE version you are using.

Version: 2.0.3
Date: 2022-12-05T09:29:06.685Z
CLI Version: 0.29.0 [76251df9]

Copyright © 2022 Arduino SA

MacBook Pro 2019 iOs Ventura 13.1

Thank you for your help!

OK, thanks. This error could be caused by something going wrong while the IDE was installing the "Arduino AVR Boards" platform that adds support for the boards like Uno, Nano, Mega.

The easiest technique for correcting that type of problem is to use the Arduino IDE "Boards Manager" to uninstall and then reinstall the platform. I'll provide instructions for doing that:

  1. Select Tools > Board > Boards Manager from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  2. Scroll down through the list of boards platforms until you see the "Arduino AVR Boards" entry.
  3. Hover the mouse pointer over the "INSTALLED" label on the "Arduino AVR Boards" entry. You will now see it change to an "UNINSTALL" button.
  4. Click the "UNINSTALL" button.
  5. Wait for the uninstall process to finish.
  6. Click the "INSTALL" button at the bottom of the "Arduino AVR Boards" entry.
  7. Wait for the installation to finish.

Now try compiling your sketch again. Hopefully the error will no longer occur.

I think that worked. Thank you!

You are welcome. I'm glad it is working now.

Regards,
Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.