转自官网的文档。

How to Run cpp-tests
on win32

In this article, I will show you how to run cpp-tests on your windows PC.

Environmental
Requirements

Compile
and Run the TestCpp Project

  • Download cocos2d-x from our download page and unzip it on your working directory. The structure of the directory should look like as following:

  • Open file "cocos2d-win32.vc2012.sln" in "build" folder as fllowing:

  • Right click the "TestCpp" project, and select "Set as StartUp Project", then you can compile and run the TestCpp project, here is the screenshot:

How to Create a Empty Project

Prerequisite

At first, you need to download and install python 2.7 to finish the following steps.

Then, you should add the path "[cocos2d-x root]\tools\cocos2d-console\bin\" into your system environment path, don't forget to add a ';' as delimiter. For example, my bin path is "F:\source\cocos2d-x\tools\cocos2d-console\bin", and I will add it to the end
of PATH as following:

(Note: The [cocos2d-x root] is the path where you unzip your downloaded cocos2d-x package)

Open cmd and change current path to the bin path, and input the cmd "cocos -h", if it outputs the help message, congratuation, you have added the right path in the environment variables. We can create a project by usingcocos2d-console commands
now.

Type "cocos new -h", and you will get the following result :

Now it's time to use the command to create a new empty project.

For example, I want to create a cpp project, then I can type "cocos new MyGame -p com.MyCompany.AwesomeGame -l cpp -d F:/MyProject". This command will create a cpp project under F:/MyProject directory. Here is the screenshot:

How to Compile and Run the Empty Project

Open MyGames.sln in the proj.win32 folder, press "Ctrl-F5" to compiling and running the project. If you compiles and run without any errors, you will get the following results:

执行的时候也能够在命令行直接输入命令cocos run -p win32

另一个创建项目的方法是在CocosStudio的场景编辑器中能够创建新项目

cocos2dx 3.0rc怎样创建项目的更多相关文章

  1. cocos2d-x使用python脚本创建项目的简单方法

    本文有CC原创,转载请注明地址:http://blog.csdn.net/oktears/article/details/13297003 在cocos2d-x2.1.4以上的版本中,取消了使用vs模 ...

  2. 关于cocos2dx的C++调用创建项目

    我使用的是cocos2dx-2.1.4版本+cygwin,其实主要是为了配合公司项目,所以用了低版本的cocos2dx 假设已经配置环境成功: 按照对应的要求输入包名,项目名,以及TargetId,就 ...

  3. cocos2d-x 2.2.3 创建项目的方法

    直接复制粘贴到txt文本,然后修改后缀为.bat,然后将bat文件放到tools\project-creator的目录下即可. :project_input @echo 请输入项目名称,按回车,例:H ...

  4. 開始折腾cocos2d-x,使用批处理来创建项目

    開始抽出时间学习cocos2d-x了.尽管C和C++还都不咋地.只是在开发中学习记忆也许会更深吧. so决定从今天開始正式学习的用自己的空暇时间折腾它了.正好这个五一没什么事.昨天搭建了一下开发环境. ...

  5. 开始折腾cocos2d-x,使用批处理来创建项目

    开始服用的时间来学习cocos2d-x该,尽管C和C++另外不咋.只是学习和记忆可能是更深层次的,现在发展: so从今天开始正式决定学会与自己的业余时间折腾吧,仅这51什么.昨天,在开发环境中建,Vi ...

  6. cocos2d-x 2.1.4 使用create_project.py脚本创建项目+ant打包项目

    1.创建项目:执行create_project.py脚本,进入Doc界面输入下面的命令: cd D:\cocos2d-x-2.1.4\cocos2d-x-2.1.4\tools\project-cre ...

  7. [Cocos2d-x]创建项目

    从cocos2d-x 2.1.4之后,就不提供工程项目模板的安装文件了,我们只能手工修改以前的安装文件,让它连接最新的工程,但是这样很麻烦. 我们可以使用python命令创建cocos2d-x项目 步 ...

  8. Lua + win 10 + vs2017的运行环境和创建cocos2dx 3.17的lua项目(亲测)

    转:https://blog.csdn.net/maoye198602102339/article/details/82047920   不管用什么引擎写游戏,脚本语言是少不了要接触的! 首先,我说的 ...

  9. cocos2d-x 3.0 创建项目

    cocos2d-x 3.0 创建项目  点击打开链接

随机推荐

  1. [POI2007]Tourist Attractions

    题目大意: 给你一个$n(n\leq 2\times 10^4)$个点,$m(m\leq 2\times 10^5)$条边的带边权的连通图.其中有$k(k\leq 20)$个关键点.关键点之间有$g$ ...

  2. log4j配置文件中的additivity属性

    它是 子Logger 是否继承 父Logger 的 输出源(appender)的标志位.具体说,默认情况下子Logger会继承父Logger的appender,也就是说子Logger会在父Logger ...

  3. 前端JavaScript实现跨域的方式(转)

    这里说的js跨域是指通过js在不同的域之间进行数据传输或通信,比如用ajax向一个不同的域请求数据,或者通过js获取页面中不同域的框架中(iframe)的数据.只要协议.域名.端口有任何一个不同,都被 ...

  4. sql server 2008 R2 数据库文件大小限制

    select @@version SQL2005 分五个版本,如下所列: 1.Enterprise(企业版) 2.Development(开发版) 3.Workgroup,(工作群版) 4.Stand ...

  5. SQL SERVER Update from 使用陷阱

    原文:SQL SERVER Update from 使用陷阱 update A set from A left join B on 此方法常用来使用根据一个表更新另一个表的数据,来进行数据同步更新.若 ...

  6. 链接服务器 "(null)" 的 OLE DB 访问接口 "SQLNCLI11" 指示该对象没有列,或当前用户没有访问该对象的权限。

    原文:链接服务器 "(null)" 的 OLE DB 访问接口 "SQLNCLI11" 指示该对象没有列,或当前用户没有访问该对象的权限. SELECT * F ...

  7. jquery的attr和prop区别之实例

    对于HTML元素本身就带有的固有属性,在处理时,使用prop方法. 对于HTML元素我们自己自定义的DOM属性,在处理时,使用attr方法. html文件 <tr> <th>& ...

  8. solr 常用命令

    1.启动和关闭 a.启动和重启 启动和重启命令有很多选项让你运行在SolrCloud模式,使用示例配置,以hostname为开头或者非默认端口,指向本地ZooKeeper. bin/solr star ...

  9. CentOS 7.2通过yum安装zabbix

    环境说明 系统版本    CentOS 7.2 x86_64 软件版本    yum安装zabbix 3.0.18 首先准备一台纯净的CentOS 7.2系统 1.配置zabbix源 [root@za ...

  10. Excel 数据导入SQL XML 自动生成表头

    去出差的时候应客户要求要要将Excel 文件内的数据批量导入到数据库中,而且有各种不同种类的表格,如果每一个表格多对应一个数据表的话, 按照正常的方法应该是创建数据表,创建数据库中映射的数据模型,然后 ...