今天想开始学Cocos2d-x,于是根据书本的提示到网上去下载了所需的安装包,我下载的cocos2d-x版本是2.2.3。在下载完成之后按照书中的步骤对其环境进行配置。在搞到模板安装这一步,发现找不到install-templates-msvc.bat这个文件,折腾了半天,网上说现在的版
今天想开始学Cocos2d-x,于是根据书本的提示到网上去下载了所需的安装包,我下载的cocos2d-x版本是2.2.3。在下载完成之后按照书中的步骤对其环境进行配置。在搞到模板安装这一步,发现找不到 install-templates-msvc.bat这个文件,折腾了半天,网上说现在的版本不支持模板创建了,可以用命令创建项目(在.......\cocos2d-x-2.2.3\tools\project-creator目录下的create_project.py文件),于是按照网上说的用命令进行了项目的创建,终于成功的创建了第一个项目。开心。。。
项目虽然是创建成功了,但是感觉这样太麻烦了,还是想能像创建C++或其他项目那样有个向导,这样方便多了。于是决定想办法解决它。
在网上查找了这个文件,发现还真有得下载,于是果断下载了。之后把它放到了cocos2d-x-2.2.3\template目录里面,运行:发现提示在C盘的某个目录下找不到文件template\template\msvc\......。打开编辑install-templates-msvc.bat文件,把template\去掉。在次运行,成功了!!!
打开vs2012,新建项目,还真的就有了创建项目的模板。高兴之下创建了第一个用模板创建的项目。
执行编译!!!问题来了:提示找不到 “CCStdC.h”、“ cocos2d.h”这些文件。 打开解决方案资源管理器,展开外部依赖项,随便找了个.h文件,右击->属性,然后看了下路径。再打开刚才用命令创建的项目,用同样的方法看了外部依赖项,发现包含的文件都不同。解决方法:右击项目->属性->C/C++->常规->附加包含目录 点击旁边的三角形符号(下拉框),选择编辑,在弹出的对话框中点击 ”宏“按钮。找到SolutionDir,发现这个宏即本项目的路径,于是到Cocos2d-2.2.3目录下把的一些文件夹(”cocos2dx“,”CocosDenshion“, "extensions", ”external“, ”scripting“)拷贝到项目的目录中,编译通过!!!这就算是把模板项目的创建搞定了。
不过有个问题,就是每次创建项目到要把这些文件拷贝到项目里面,这样子会很占空间,既然是公用库,那就一份就够了,于是把这些文件夹拷贝到跟项目同一级的目录当中,如我的项目创建在 e :\myCocos2dx\ 目录当中,这些文件夹也就放在这个目录当中,然后修改上一步说提到的 ”附加包含目录“ ,全选附加包含目录的所有内容,把它粘贴到记事本中进行编辑,如我复制的内容是 .;..\Classes;$(SolutionDir)cocos2dx;$(SolutionDir)cocos2dx\include;$(SolutionDir)cocos2dx\kazmath\include;$(SolutionDir)cocos2dx\platform\win32;$(SolutionDir)cocos2dx\platform\third_party\win32;$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES;$(SolutionDir)external;$(SolutionDir)CocosDenshion\include;%(AdditionalIncludeDirectories)
然后只需要Ctrl+h ,弹出替换内容对话框,在查找内容上输入"Dir)" ,在替换为上输入 ”Dir)..\“,然后点击全部替换按钮。搞定!!!把它复制,粘贴到”附加包含目录“中,点击确定,编译,运行!!!成功。。。
这种方法是实现了创建新项目后共用这些文件,缺点就是需要修改”附加包含目录"中的内容。大家觉得那种方便就用哪种吧!
以上是研究了一个晚上的成果,虽然能帮到遇到同样问题的人。同时自己也作为学习记录。

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.