dirent is a linux header. Either use stdlib or some wrapper http://stackoverflow.com/questions/5530933/dirent-h-in-visual-studio-2010-or-2008