The problem of COCOS2DX 3.13 Simulator

Source: Internet
Author: User

Download the new COCOS2DX 3.13, want to use simulator to run the LUA project, the results found that using vs2013 compilation does not pass.

1.

9>main.cpp (5): Error C2146: syntax error: Missing ";" (in front of the identifier "wWinMain")
9>main.cpp (9): Warning C4007: "wWinMain": Must Be "__stdcall"
9>main.cpp (9): Error C4430: Missing type specifier-assumed int. Note: C + + does not support the default int

Workaround:

Change the 5th line in main.cpp apientry to WINAPI or __stdcall

2.

2>c:\program Files (x86) \msbuild\microsoft.cpp\v4.0\v120\microsoft.cppcommon.targets (132,5): Error MSB3073: Command "If not exist" D:\cocos2d-x-3.13\tools\simulator\frameworks\runtime-src\proj.win32\: \.. \.. \runtime "MkDir" D:\cocos2d-x-3.13\tools\simulator\frameworks\runtime-src\proj.win32\. \.. \.. \runtime "
2>c:\program Files (x86) \msbuild\microsoft.cpp\v4.0\v120\microsoft.cppcommon.targets (132,5): Error MSB3073:
2>c:\program Files (x86) \msbuild\microsoft.cpp\v4.0\v120\microsoft.cppcommon.targets (132,5): Error MSB3073: If not exist "D:\cocos2d-x-3.13\tools\simulator\frameworks\runtime-src\proj.win32\". \.. \.. \runtime\win32 "MkDir" D:\cocos2d-x-3.13\tools\simulator\frameworks\runtime-src\proj.win32\. \.. \.. \runtime\win32 "
2>c:\program Files (x86) \msbuild\microsoft.cpp\v4.0\v120\microsoft.cppcommon.targets (132,5): Error MSB3073:
2>c:\program Files (x86) \msbuild\microsoft.cpp\v4.0\v120\microsoft.cppcommon.targets (132,5): Error MSB3073: xcopy/y/q "D:\cocos2d-x-3.13\tools\simulator\frameworks\runtime-src\proj.win32\debug.win32\*.dll" "D:\ Cocos2d-x-3.13\tools\simulator\frameworks\runtime-src\proj.win32\. \.. \.. \runtime\win32 "
2>c:\program Files (x86) \msbuild\microsoft.cpp\v4.0\v120\microsoft.cppcommon.targets (132,5): Error MSB3073: xcopy/y/q "D:\cocos2d-x-3.13\tools\simulator\frameworks\runtime-src\proj.win32\debug.win32\*.exe" "D:\ Cocos2d-x-3.13\tools\simulator\frameworks\runtime-src\proj.win32\. \.. \.. \runtime\win32 "
2>c:\program Files (x86) \msbuild\microsoft.cpp\v4.0\v120\microsoft.cppcommon.targets (132,5): Error MSB3073: xcopy/y/q "D:\cocos2d-x-3.13\tools\simulator\frameworks\runtime-src\proj.win32\Debug.win32\lang" "d:\ Cocos2d-x-3.13\tools\simulator\frameworks\runtime-src\proj.win32\. \.. \.. \runtime\win32 "
2>c:\program Files (x86) \msbuild\microsoft.cpp\v4.0\v120\microsoft.cppcommon.targets (132,5): Error MSB3073:
2>c:\program Files (x86) \msbuild\microsoft.cpp\v4.0\v120\microsoft.cppcommon.targets (132,5): Error MSB3073: : Vcend "exited with code 4.

Workaround:

Project Properties > Build Events > Post-Build Events > Command line, will be inside the last paragraph: xcopy/y/q "$ (OutDir) lang" "$ (ProjectDir). \.. \.. \runtime\win32 "Delete (this language file will be mentioned below, if not deleted here, it is possible to copy the corresponding lang file to the appropriate place)

3. Well, so far, the compilation problem has been solved. But it's not possible to put simulator on a LUA project and see the code find that the Start method call for the corresponding script implementation is gone.

Workaround: (This process is actually to move the whole thing of the old engine)

Download the old COCOS2DX engine (mine is 3.10) and fill in the missing files and code.

① Copy the Cocos2d-x-3.10\tools\simulator\frameworks\runtime-src\classes\ide-support to the corresponding new engine folder (contains the language file lang)

② Add code to the simulator project, because we only use LUA, so only add Lua to the inside (compile JS is a bit of a problem, because only using LUA, so the JS problem skipped)

③ Copy the contents of the Cocos2d-x-3.10\tools\simulator\frameworks\runtime-src\classes\appdelegate.cpp file to the corresponding file of the new engine, and block the JS related code

OK, compiled and put into LUA project, normal operation.

The problem of COCOS2DX 3.13 Simulator

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.