fix build error and add .gitignore