Home > other >  To compile error game under cocos2d - x VS
To compile error game under cocos2d - x VS

Time:09-23

Cocos d - 2 x compile games 0 xc0000005 mistakes in VS2013 environment, location is here

Void MenuScene: : initBG ()
{
Auto SPR=Sprite: : create (" menu/menu - bg. PNG ");
SPR - & gt; SetPosition (Point (Director: : getInstance () - & gt; GetWinSize (). The width/2, Director: : getInstance () - & gt; GetWinSize (). The height/2));
This - & gt; AddChild (SPR);
}
Check the automatic window found the following problems

How do I solve

CodePudding user response:

SPR null, create failure, certainly is picture does not exist or file name to write wrong

CodePudding user response:

Is if the errors in the code, and its problems and explain the upstairs, the address corresponding to the image does not exist, make sure that your resources, the path to the right, I guess your address is missing a "res/"
  • Related