Arduino Wii nunchuck code error

So i'm doing a school project involving a Wii controller, a "Air Swimmer shark" and an Arduino.
I'm a complete beginner with Arduino so I googled some projects involving steering with a Wii nunchuck.
I found this one code that was supposed to be uploaded to the Arduino:

But when I verify the code I get an error with this message:

core.a(main.cpp.o): In function main': /Users/samaelzelaya/Downloads/ undefined reference to setup'
/Users/samaelzelaya/Downloads/ undefined reference to `loop'

I have no idea what to change to make it work. If someone with a little more knowledge could help me out i'd be forever grateful!

The code linked is only a library, not a complete sketch.
You need to save it in the directory of libraries (in project folder) in a new folder named WiiChuck

On my computer: D:\arduino\MyProjects\LIBRARIES where you have your sketch
attention, NOT this D:\arduino\arduino-IDE\libraries (standard libraries from Arduino team)

After you can use this library:

#include <WiiChuck.h>

MyChuck WiiChuck;     // declare an object named MyChuck of class WiiChuck

void setup()
{  delay(1000);

void loop()
{ MyChuck.update();
  Serial.print("ButtonZ:"); Serial.println(MyChuck.buttonZ);
  Serial.print("JoyX:"); Serial.println(MyChuck.joyX);
  Serial.print("JoyY:"); Serial.println(MyChuck.joyY);

But I don’t know this library so I’m not sure how use it.

Another library with examples: