Sta lavorando su Windows XP, e, come spiegato, dirent.h esiste solo su sistemi POSIX.