Write cocos2d-x always encounter this warning

Warning c4530 uses a c++ exception handler but not enabled semantic please specify ehsc cocos2d-x
This is how the story ah, I use vs2012, and great point.

Started by Winnie at December 13, 2016 - 7:05 AM

Who else can you tell me the compiler, runtime can't open the window.
bool HelloWorld::init()
{
bool bRet = false;
do
{
//////////////////////////////////////////////////////////////////////////
// super init first
//////////////////////////////////////////////////////////////////////////

CC_BREAK_IF(! CCLayer::init());

CCSpriteFrameCache *pFrameCache = CCSpriteFrameCache::sharedSpriteFrameCache();
CC_BREAK_IF(!pFrameCache);
pFrameCache->addSpriteFramesWithFile("game.plist");

CCSprite * sprite;
CCSpriteFrame * spriteFrame;
char str[10];
CCArray * pArray = CCArray::createWithCapacity(8);

for(int i=0;i<8;i++)
{
sprintf(str,"1(%d)",i+1);
spriteFrame = pFrameCache->spriteFrameByName(str);
pArray->addObject(spriteFrame);
if(i == 0)
{
sprite = CCSprite::createWithSpriteFrame(spriteFrame);
sprite->setPosition(ccp(50,50));
this->addChild(sprite);
}
}

CCAnimation * pAnimation = CCAnimation::createWithSpriteFrames(pArray,0.2f);
CCAnimate * pAnimate = CCAnimate::create(pAnimation);
this->runAction(CCRepeatForever::create(pAnimate));

bRet = true;
} while (0);

return bRet;
}

Posted by Winnie at December 27, 2016 - 8:02 AM

When debugging is this statement pass
pFrameCache->addSpriteFramesWithFile("game.plist");
But I loaded with game.plist and game.png to the project file folder in resource ah, how ah, under the display generation is successful, a pop-up window displays stop working.

Posted by Winnie at December 31, 2016 - 8:50 AM

With this problem solved, but there was no answer, so wasted divided? God help look at this problem.

A good, send you into this.

Posted by Winnie at January 06, 2017 - 9:37 AM