Error compiling for board Arduino/Genuino Mega or Mega 2560.

Arduino: 1.6.10 (Windows 8.1), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

In file included from C:\Users\baksadj\AppData\Local\Temp\arduino_modified_sketch_299404\sketch_aug11a.ino:7:0:

C:\Users\baksadj\Documents\Arduino\libraries\Marlin/dogm_font_data_marlin.h:12:25: fatal error: utility/u8g.h: No such file or directory

#include <utility/u8g.h>

^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

How to fix this?

thank you

Do you have a file u8g.h in a utility directory in the standard library location or current sketch folder?

May be you need this https://github.com/olikraus/U8glib_Arduino

J-M-L: Do you have a file u8g.h in a utility directory in the standard library location or current sketch folder?

May be you need this https://github.com/olikraus/U8glib_Arduino

I repeat again In file included from C:\Users\baksadj\AppData\Local\Temp\arduino_modified_sketch_299404\sketch_aug11a.ino:7:0:

I have not put the sketch, Arduino Software (IDE) is a new installation of all the folders have been previously deleted. I have the same problem with version 1.6.9

I repeat again In file included from C:\Users\baksadj\AppData\Local\Temp\arduino_modified_sketch_299404\sketch_aug11a.ino:7:0:

you can repeat again and again.. that does not answer the question. The compiler is telling you a file is missing - that's the one I point above and it's looking for it in a utility directory.

we don't know what code is in

C:\Users\baksadj\AppData\Local\Temp\arduino_modified_sketch_299404\sketch_aug11a.ino

we dont know what you do when you get this message etc... So not sure we can help if you don't provide more context...

As @JML suggested you dont have the external lib files. If your external files downloaded in zip format then,

Goto Arduino IDE->Sketch->Include Library-> Add .Zip Library

The above steps will added and you can see the library in Include Library menu.

Open your sketch and choose the required library from Include Library sub menu.

If you still get errors, give us some more details.

D:\materi semester 7\LONGSOR\program\LCD\LCD.ino:2:31: fatal error: LiquidCrystal_I2C.h: No such file or directory

#include <LiquidCrystal_I2C.h>

^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

fatal error: LiquidCrystal_I2C.h: No such file or directory

Could the message possibly be any clearer? You can NOT include a file you don't have. Get over it.

@sulkhi go read Installing Additional Arduino Libraries

You can also check common libraries

Once you get what a library is, install the ones you need, then compile the code

how do you quote plus I have coding questions like how do you move motors and can you point me to a thread that would answer my questions!

@Arduino27 - hijacking threads is not very welcome practice.

Your question related to a raspberry screen, this is the arduino forum.

Bot?

-jim lee

jimLee: Bot?

-jim lee

Only if Arduino27 is female, in which case that would be bother, and that is true.

Hello All,

I am new to arduino and programming, I bought a 3D printer kit and i need to calibrate the extrude.

I am getting the same message, but the body is not as the same as this post.

Arduino: 1.8.0 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Users\ta01305\AppData\Local\Temp\ccm4Eayk.ltrans0.ltrans.o: In function `main':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:43: undefined reference to `setup'

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:46: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

exit status 1 Error compiling for board Arduino/Genuino Mega or Mega 2560.

Could anyone give me a hand?

this is the code i am trying to burn

define MANUAL_HOME_POSITIONS

define BED_CENTER_AT_0_0

define MANUAL_X_HOME_POS 0

define MANUAL_Y_HOME_POS 0

define MANUAL_Z_HOME_POS 274

BR//

loconte:
Arduino: 1.8.0 (Windows 7), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

This is the default error you get when there’s a compilation error. Your actual error (the lines in between) has nothing to do with this thread. Please start a new thread, and we’ll try to answer your question over there.

Please read the forum guidelines (first thread in each subforum) before posting, and use code tags (type [code] [/code] or use the </> button).

Pieter

i have some problem for sensor BH1750 light sensor this code can not be sketch
/*

Example of BH1750 library usage.

This example initalises the BH1750 object using the default
high resolution mode and then makes a light level reading every second.

Connection:
VCC-5v
GND-GND
SCL-SCL(analog pin 5)
SDA-SDA(analog pin 4)
ADD-NC or GND

*/

#include <Wire.h>
#include <BH1750.h>

BH1750 lightMeter;

void setup(){
Serial.begin(9600);
lightMeter.begin();
Serial.println(“Running…”);
}

void loop() {
uint16_t lux = lightMeter.readLightLevel();
Serial.print(“Light: “);
Serial.print(lux);
Serial.println(” lx”);
delay(1000);
}

this show exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 256

I get the same message when compiling your code. On the other hand, when I scroll up a bit, I see that there are other messages. You start fixing problems at the top, NOT the bottom.

hello i just got a new 3d printer and i tried uploading the marlin software on it and unfortunately with many errors i have no idea what to do can someone please help this is my first time doing this on such a device

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 152908 bytes (60%) of program storage space. Maximum is 253952 bytes. Global variables use 6416 bytes (78%) of dynamic memory, leaving 1776 bytes for local variables. Maximum is 8192 bytes. Low memory available, stability problems may occur. avrdude: ser_open(): can't set com-state for "\.\COM4" avrdude: ser_drain(): read error: The handle is invalid.

avrdude: ser_send(): write error: sorry no info avail avrdude: stk500_send(): failed to send command to serial port avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout avrdude: ser_send(): write error: sorry no info avail avrdude: stk500_send(): failed to send command to serial port avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout avrdude: ser_send(): write error: sorry no info avail avrdude: stk500_send(): failed to send command to serial port avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout avrdude: ser_send(): write error: sorry no info avail avrdude: stk500_send(): failed to send command to serial port avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout avrdude: ser_send(): write error: sorry no info avail avrdude: stk500_send(): failed to send command to serial port avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout avrdude: ser_send(): write error: sorry no info avail avrdude: stk500_send(): failed to send command to serial port avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer the selected serial port avrdude: stk500v2_getsync(): timeout communicating with programmer does not exist or your board is not connected

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

With the Arduino not connected to the PC, start the IDE. Choose Tools + Port. Make a list of the ports that the Mega will not be using.

Close the IDE. Connect the Mega. Start the IDE. Choose Tools + Port. The port that is in the list this time, but was not there the first time, is the one that the Mega is connected to. Choose that port.

If there are no new ports the second time, you have not installed the required Mega drivers.