cocos2d-lua V3.10. There are still some problems in the new construction. After several days of research, it was finally realized.
Step 1: First create a new project with V3.10 software, as shown in the figure:
Step 2: Compile the newly created project with VS:
Step 3: Add the Win32 control output console, otherwise you will not see the Log information
1) Add the following code to main.cpp in the project:
Code:
- #ifdef USE_WIN32_CONSOLE
- AllocConsole ();
- freopen("CONIN$", "r", stdin);
- freopen("CONOUT$", "w", stdout);
- freopen("CONOUT$", "w", stderr);
- #endif
2) Add the following code in the properties of the project - "C/C++-"Pre-editing -":
Code:
- USE_WIN32_CONSOLE
Step 4: Copy the files under the compiled directory D:\simulator\win32 to the main project directory.
Step 5: Open the MainScene.lua file in the Sublime editor, write a print() output log, and then click the exe in the main directory to run the program. The project can be opened.
Finally, basically a new project is established, I hope it can help newbies~