Noobie Question - Create Cocos2D-X project under a New Solution Outside the Cocos2D-X folder


Hi Cocos2D-X experts,

Could someone help me on how to create a new cocos2d project outside the ‘cocos2dx…verse number’ folder. I have ran through the Win32 tutorials and have successfully been able to run the HelloWorld test project.

Now I am trying to create a new project, using a new solution in a different folder but when I try to run it I get a bunch of error msgs (see attachment). I added the “coco2sx win32” project and the “CocosDenshion win32” project into my new project (Add > Existing Proj option by right-clicking the soln). Right-clicked the TestApp project > References: Added the two projects into the References section, also added the folders that contained the files in the build errors into the ‘Additional Reference Search Path’, but for some reason the build is still giving me errors msgs.

Any help to fix the error msgs would be much appreciated.

Thanks in advance.

5-18-2011_5-52-41_PM.png (146.6 KB)


Hi, Ron, you had to modify
* Property > Configuration Properties> C/C++ > General> Additional Include Directories
* Property > Configuration Properties> Linker > General> Additional Library Directories
Hope these can help you.


Hi Walzer,

I have already verified that the additional include directories are mapped correctly, Thank you for putting me on the right path. When I tried to do a build (debug mode), I kept getting linking errors, so I copies the following lib files into my TestApp project debug folder

  • libcocos2d.lib
  • libCocosDenshion.lib
  • libgles_cm.lib

That solved the linking errors but now I am getting a bunch of new unresolved external symbol errors (28 errors), but I assume probably fixing one or two will resolve the rest.

I am attaching a zipped copy of my TestApp, it is a vs2008 project. Could you take a look and advise if I am missing any additional linking which is causing the build problems.

Thanks in advance.


You might want to include the actual VS project if you’d like us to take a look at it :wink:


yep, plz post your .sln & .vcproj, so we can help you to check the settings


Hi guys,

I have included the entire project in the zipped file in my earlier post. Soln file, proj file and all .h and .cpp files.

Please advise if you don’t see it when you unzip the attached folder. I can re-upload the entire project again.



It’s not there. You’ve only included the headers, sources, object files, static library files, program database and resources.


Sorry guys, not sure what happened, my WinZip app must have goofed up while zipping up the entire project and decided to be selective.

I have uploaded another Zipped folder called and verified before uploading all files are there. Soln file, proj file and all .h and .cpp files.

Thanks for being being patient with me.


I build the TestApp2, it report some symbol can’t find in libCocos2d.lib when link.
After I compiled libCocos2d.lib myself and replace the same file in TestApp2/Debug.win32, it complied successful:)
My cocos2d-x code is the last version from cocos2d github.
Wish some help for you.


I finally got it to work. :stuck_out_tongue: From lessons learnt, is there an easier way to do Debug | Release builds and not have to copy a bunch of DLL and LIB files in the Debug and Release folder.

My assumption is if I had checked Box2D in the project creation wizard, I would also need to include its sppting DDL and LIB files in my project’s Debug, Release folders.

Downloaded the latest version ‘’cocos2d-0.99.5-x-0.8.3’‘from the Downloads section. Unzipped and ran the ~win32.bat file to do its magic. Then ran the templates.bat to install the templates.
Opened the accompanying win32 soln file in vs2008 and did a batch build to rebuild all projects in that soln. So far so good.
Created a new vs2008 project using the cocos2d-x win32 template.
In the proj property > Config Properties > C/C++ > General > Additional Include Directories
Fixed all directory links to point to where the cocos2d-0.99.5-x-0.8.3 file paths were.
I tried to do a build but got the libcocos2d.lib could not be opened error. I ended up copying the following files into my project’s Debug.win32 folder from ’cocos2d-0.99.5-x-0.8.3’ > Debug.win32 folder, and the same for Release.win32.
* libgles_cm.lib
* libcocos2d.lib
* libCocosDenshion.lib
* zlib1.dll
* iconv.dll
* libcocos2d.dll
* libCocosDenshion.dll
* libEGL.dll
* libgles_cm.dll
* libxml2.dll

Thank you all for being patient and very responsive. I really appreciate all the help and guidance. It really means a lot for a beginner, computer science student trying to learn a new platform by myself, especially when things blow up in my face almost every step. :slight_smile: