Error message when trying to verify Tone tutorial : http://arduino.cc/en/Tutor

Hi! This is my code:

#include "pitches.h"


int melody[]={
  NOTE_C4,NOTE_G3,NOTE_G3,NOTE_A3,NOTE_G3,0,NOTE_B3,NOTE_C4};
int thisNote;
int noteDurations[]={
    4,8,8,4,4,4,4,4};
    

    int noteDuration;
  void setup(){
     for(thisNote=0;thisNote<8;thisNote++){
       
       noteDuration=1000/noteDurations[thisNote];
      tone(8,melody[thisNote],noteDuration);
      
      int pauseBetweenNotes = noteDuration * 1.30;
      delay (pauseBetweenNotes);
      noTone(8); //stop note playing
     }
    }
    void loop(){
    }

I also have the pitches.h saved in a tab with the code that is given in the tutorial.
Here are my errors:

Arduino: nightly (Mac OS X), Board: "Arduino Uno"

Build options changed, rebuilding all
core.a(main.cpp.o): In function `main':
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/main.cpp:40: undefined reference to `setup'
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/main.cpp:43: undefined reference to `loop'
collect2: error: ld returned 1 exit status

What am I doing wrong?

Thank you for your help.

What am I doing wrong?

Using a Mac ? :slight_smile:
More seriously, using a build of the IDE that may not be stable. The code compiles OK for me on a PC using IDE versions 1.0.5 amd 1.5.6-r2

Try an earlier version of the IDE or reinstall the once you have.

Your folder probably has the name of one Arduino's function.

Just try to rename it.

Compiles fine for me using Arduino 1.0.6