我在cocos2d-x-2.2.1\projects\game 项目里面只是声明一个UIWidget 变量就 报错 (头文件也有添加)
#include “CocoStudio\GUI\BaseClasses\UIWidget.h”
1>…\Classes\ActionsTest\ActionsTest.cpp(208): error C2065: “UIWidget”: 未声明的标识符
1>…\Classes\ActionsTest\ActionsTest.cpp(208): error C2065: “wd”: 未声明的标识符
1>…\Classes\ActionsTest\ActionsTest.cpp(208): error C2061: 语法错误: 标识符“UIWidget”
代码如下:
// add “HelloWorld” splash screen"
CCSprite* pSprite = CCSprite::create(“HelloWorld.png”);
// position the sprite on the center of the screen
pSprite->setPosition(ccp(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y));
// add the sprite as a child to this layer
this->addChild(pSprite, 0);
UIWidget *wd=UIWidget::create();
//addWidget(wd=GUIReader::shareReader()->widgetFromJsonFile(“Json/SampleChangeEquip_1.json”));
//wd->setPosition(0,0);
//this->addChild(wd, 0);