fix some code and modify .pro file so can be compiled on Winsows