Merge pull request #17 from yaoInnovation/master

fixed compiling errors
add define
fix bugs
Merge remote-tracking branch 'upstream/master'