fix compile error and add .gitignore