Win7下采用VS2010初次编译cocos2d-x-2.1.4出错解决办法

时间:2023-02-06 20:21:43

作者:蓝白云


问题:

错误    180    error MSB3073: 命令“if not exist "F:\Downloads\cocos2d-x-2.1.4\cocos2d-x-2.1.4\Debug.win32\" mkdir "F:\Downloads\cocos2d-x-2.1.4\cocos2d-x-2.1.4\Debug.win32\"

if exist "F:\Downloads\cocos2d-x-2.1.4\cocos2d-x-2.1.4\Debug.win32\\CocosDragonJSRes" rd /s /q "F:\Downloads\cocos2d-x-2.1.4\cocos2d-x-2.1.4\Debug.win32\\CocosDragonJSRes"
mkdir "F:\Downloads\cocos2d-x-2.1.4\cocos2d-x-2.1.4\Debug.win32\\CocosDragonJSRes"
xcopy "F:\Downloads\cocos2d-x-2.1.4\cocos2d-x-2.1.4\samples\Javascript\CocosDragonJS\proj.win32\..\..\..\..\scripting\javascript\bindings\js\*.js" "F:\Downloads\cocos2d-x-2.1.4\cocos2d-x-2.1.4\Debug.win32\\CocosDragonJSRes" /e /Y
xcopy "F:\Downloads\cocos2d-x-2.1.4\cocos2d-x-2.1.4\samples\Javascript\CocosDragonJS\proj.win32\..\..\Shared\games\CocosDragonJS\Published files Android" "F:\Downloads\cocos2d-x-2.1.4\cocos2d-x-2.1.4\Debug.win32\\CocosDragonJSRes\" /e /Y
:VCEnd”已退出,代码为 4。    C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets    103    6    CocosDragonJS


将以上命令分别在DOS命令行中执行,最后一行命令执行失败。

临时解决办法(具体原因需进一步研究):

F:\Downloads\cocos2d-x-2.1.4\cocos2d-x-2.1.4\samples\Javascript\CocosDragonJS\proj.win32\..\..\Shared\games目录中新建二个目录 CocosDragonJS\Published files Android