Merge pull request #6800 from dabingnn/v3_fix_template

fix cpp_template
fix cpp template linux
Merge pull request #6801 from dabingnn/v3_fix_template

[ci skip]fix cpp template linux
fix compile error for lua template
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_fix