Вопрос

I'm learning cocos2d-x and I want to create a project in VS, but I find that there is no template for VS, the version of cocos2d-x is 2.1.4. So I wonder what can I do to build a cocos2d-x project in VS2010 support both Lua and box2d

Many thanks :)

Это было полезно?

Решение

  1. Install python 2.6
  2. Open a command line window
  3. Go to your cocos2d-x-2.1.4\tools\project-creator folder
  4. Run create_project.py. Usage:

    create_project.py -project YourProjectName -package com.example.PakcageName -language cpp

  5. Your project will be created in cocos2d-x-2.1.4\projects

Другие советы

If you follow the solution @Chen provided, I believe there is build-in box2d support. And you can add lua support following this step.

1.add "scripting/lua/proj.win32" project to your solution in visual studio. 2.right click solution, and add "liblua" rely to your project.

rebuild your project. And add

#include <CCLuaEngine.h>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top