The Fix for the Tutorial Errors- Setting up Cocos2d-x Win32 in Visual Studio 2008

The Fix for the Tutorial Errors- Setting up Cocos2d-x Win32 in Visual Studio 2008
0.0 0


Visual Studio 2010 gives errors in the new project Wizard, so you must use the Visual Studio 2008 version. (I use express).

I found a solution, and I think I understand why. The fact it merges all the directories without giving you options really messed me up!

  1. X:2Dx (where my source is, unzipped the entire source file into this folder)
  2. Ran build_win32.bat

^ This is where it created the solution, Debug.win32 & Release.win32.

  1. Took the resources from Release.win32 and copy/pasted them into Debug.win32 (the png files, music files, etc. All the art and sound resources.)

  2. Now both test.exe and helloworld.exe work in both Debug.win32, Release.win32. Debug.win32’s exe files wouldnt work bc the resources werent there (png’s images, etc.)

  3. After running build_win32.bat, it created these directories

  4. I created a new project, which created this folder. (This only worked in VS 2008, as it gives a Script Error in the Wizard in VS 2010).

  5. I copy and pasted Debug and Release folders into my project folder.

  6. I can now successfully build Debug version of the project without any errors.

  7. Building a Release version of the project still gave errors.

  8. It gave errors such as “cannot access *.lib file" or "missing.dll” so I copy/pasted all the .lib files into the correct folder. I forgot which, but one of them don’t have the .lib files. I did the same for the missing .dll files. I believe I did this copy/paste into the Release.win32 folder but I really forgot. Should be self explanatory though and an easy fix to just place the files in the correct folder (or just all folders).

  9. Both now work, although Release builds give a debugging information error but pressing “Yes, continue anyway” runs the program perfectly.


So if you have trouble with errors, try using the tutorial but copy/pasting or moving the folder to the correct locations.
The build-win32.bat should create two directories which both need to go inside your project folder.