fix compile and run errors in windows