I found the problem.
The sanguino wasn't correctly installed so I did it again and now the little test program is working.
The installation instructions I used are :
Updated Arduino 0018 Installation Instructions
1. Unzip the Sanguino software file. It contains some folders that need to be copied into the Arduino software directory.
2. copy sanguino-software-1.x/cores/sanguino TO arduino-0018/hardware/sanguino/cores/sanguino
3. copy arduino-0018/hardware/arduino/cores/arduino/main.cpp TO /arduino-0018/hardware/sanguino/cores/sanguino
4. copy sanguino-software-1.x/bootloaders/atmega644p TO /arduino-0018/hardware/sanguino/bootloaders/
5. copy all the folders in sanguino-software-1.x/libraries/ TO arduino-0018/hardware/libraries/ overwriting the existing libraries.
6. copy the sanguino-software-1.x/boards.txt file TO arduino-0018/hardware/sanguino WITHOUT making any changes to it
7. Restart Arduino