diff --git a/tools/tojs/genbindings-win32.bat b/tools/tojs/genbindings-win32.bat index 7437c6ce5e..b8c4c0e537 100644 --- a/tools/tojs/genbindings-win32.bat +++ b/tools/tojs/genbindings-win32.bat @@ -32,8 +32,8 @@ echo androidndkdir=%NDK_ROOT% >> %_CONF_INI_FILE% echo clangllvmdir=%NDK_LLVM_ROOT% >> %_CONF_INI_FILE% echo cocosdir=%COCOS2DX_ROOT% >> %_CONF_INI_FILE% echo cxxgeneratordir=%CXX_GENERATOR_ROOT% >> %_CONF_INI_FILE% -:: fixme: to fix parse error, we must difine __WCHAR_MAX__ here. -echo extra_flags=-D__WCHAR_MAX__=0x7fffffff >> %_CONF_INI_FILE% +:: fixme: to fix parse error, we must difine __WCHAR_MAX__ and undefine __MINGW32__ . +echo extra_flags=-D__WCHAR_MAX__=0x7fffffff -U__MINGW32__ >> %_CONF_INI_FILE% echo --- diff --git a/tools/tolua/genbindings-win32.bat b/tools/tolua/genbindings-win32.bat index 8a02e6d18f..1aeddcdcfa 100644 --- a/tools/tolua/genbindings-win32.bat +++ b/tools/tolua/genbindings-win32.bat @@ -32,8 +32,8 @@ echo androidndkdir=%NDK_ROOT% >> %_CONF_INI_FILE% echo clangllvmdir=%NDK_LLVM_ROOT% >> %_CONF_INI_FILE% echo cocosdir=%COCOS2DX_ROOT% >> %_CONF_INI_FILE% echo cxxgeneratordir=%CXX_GENERATOR_ROOT% >> %_CONF_INI_FILE% -:: fixme: to fix parse error, we must difine __WCHAR_MAX__ here. -echo extra_flags=-D__WCHAR_MAX__=0x7fffffff >> %_CONF_INI_FILE% +:: fixme: to fix parse error, we must difine __WCHAR_MAX__ and undefine __MINGW32__ . +echo extra_flags=-D__WCHAR_MAX__=0x7fffffff -U__MINGW32__ >> %_CONF_INI_FILE% echo ---