如何删除使用cocos2d-x v2.2.3(语言cpp)为Windows Phone创建的错误? [英] How to remove error created using cocos2d-x v2.2.3 (Language cpp) for windows phone?
问题描述
我正在尝试运行使用cocos2d-x-v2.2.3(语言cpp)为Windows Phone创建的游戏。但它显示以下错误。
错误C2440:'type cast':无法从'void(__ cdecl StartScene :: *)(void)'转换为'cocos2d: :extension :: SEL_CCControlHandler'
如果我在所有类文件中包含pch.h文件,则会删除上面的错误,然后创建新的错误。错误是无法打开包含文件:'pch.h':没有这样的文件或目录
虽然pch.h和pch.cpp在CocosDenshion中显示。在这种情况下我该怎么办?谢谢你提前
I'm trying to run my Game created using cocos2d-x-v2.2.3 (language cpp) for windows phone. But it shows following error.
error C2440: 'type cast' : cannot convert from 'void (__cdecl StartScene::* )(void)' to 'cocos2d::extension::SEL_CCControlHandler'
If I include pch.h file in all class file above error is removed then new error created. The error is "Cannot open include file: 'pch.h': No such file or directory"
Though pch.h and pch.cpp are presented in CocosDenshion. In this circumstances what should i do? Thanks in Advance
推荐答案
如果我包含pch.h文件删除上面的所有类文件错误,然后创建新错误。错误是无法打开包含文件:'pch.h':没有这样的文件或目录
If I include pch.h file in all class file above error is removed then new error created. The error is "Cannot open include file: 'pch.h': No such file or directory"
您必须在<包含 pch.h
的文件夹中包含code> Visual Studio 编译器搜索路径:
- 选择
项目 - >属性
菜单项。 - 在新出现的窗口中,选择
配置属性 - > VC ++目录
节点。 - 关于右侧列表视图,选择
包含目录
并添加所需路径。 - Select the
Project->Properties
menu item. - On the newly appeared window select the
Configuration Properties->VC++ Directories
node. - On the listview on the right, select
Include Directories
and add the required path.
You have to include the folder containing pch.h
in Visual Studio
compiler search path:
这篇关于如何删除使用cocos2d-x v2.2.3(语言cpp)为Windows Phone创建的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!