Hi. Using Visual Studio 2012 (either Express or Professional) I can successfully build and run C2D projects, but only when running them from within the IDE. If I navigate to the output directory (i.e., Cocos2dX\Projects\Cpp\HelloCpp\proj.win32\Release.win32) and try to execute the EXE directly, it immediately closes and throws an error in Application Event Log: Exception code: 0xc0000005. On Windows 7, it closes silently. On Windows 8, it brings up the crash dialog: “game Module has stopped working.”
I have tried this with both Express and Professional on a Windows 7 and Windows 8 machine. I’ve also tried using three different versions of Cocos2dx (2.0 through 3.0). Below are the specific steps I am taking:
1.) Run the create_project script to generate the base project folder: *create_project.py p MyGamek com.MyCompany.AwesomeGame l cpp* C:2d-x-3.0\extensions\proj.win32\CCDeprecated-ext.obj - libExtensions
2.) Open the generated solution project in Visual Studio .
3.) Build the solution . It builds successfully but with three warnings.
<pre>
warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
warning LNK4075: ignoring ‘/EDITANDCONTINUE’ due to ‘/SAFESEH’ specification - C:2d-x-3.0\projects\MyGame\proj.win32\AppDelegate.obj - MyGame
warning LNK4098: defaultlib ‘LIBCMT’ conflicts with use of other libs; use /NODEFAULTLIB:library - C:2d-x-3.0\projects\MyGame\proj.win32\LINK - MyGame
4.) Run the solution from within Visual Studio (F5). It runs perfectly.5.) Exit Visual Studio, navigate to the Debug.win32 or Release.win32 folder and run the EXE (i.e., MyGame.exe). It does not run and instead crashes and throws the 0xc0000005 error mentioned previously.
Any thoughts or advice? What am I doing wrong?