Undefined reference to 'loop' =SOLVED=

#include <TFT.h> // Hardware-specific library
#include <SPI.h>

#define CS   10
#define DC   9
#define RESET  8  

TFT myScreen = TFT(CS, DC, RESET);

void setup(){
  myScreen.background(0,0,0); // clear the screen
  // static text

Ok. So I’m trying to set up a homescreen style thing here, and I finally (thought) that I had all the code right, but all of the sudden, as its compiling, it gives me the error “Undefined reference to ‘loop’”. I have absolutely no idea what this means, so I was hoping you guys could help me out.

One other thing, please try to make your answers in english. Spoonfeed it to me if you have to. I’m quite new to this.

Thank you guys!!

It means you haven't got a function called "loop"

If you look in the directory:


at the main.cpp source code file, that file serves as the starting point for any Arduino sketch. In there, you will find a statement:


which means you must supply a loop() function even if you don't actually use it. Therefore, at the bottom of your listing add the empty function block:

void loop(){}

and the missing reference should be fixed.

Alright that worked. Thanks for the help!