Cannot build solution?

Cannot build solution?
0.0 0


1>LINK : fatal error LNK1104: cannot open file ‘libcocos2d.lib’

this is the error i get. im new to this but i searched and couldnt find a file to match this name :stuck_out_tongue:


Have you built cocos2d-win32.sln entirely?
You can check if HelloWorld.vcproj or tests.vcproj depend on cocos2d-win32.vcproj


•Run the Build-win32.bat script, which adapts vc2008 or vc2010 automatically, to build the solution, 我是用这种方式执行 第二步的 2、 Build Cocos2d-x Solution¶ 并没有运行 cocos2d-win32.vc2010.sln 但是现在由于LINK错误,尝试运行 cocos2d-win32.vc2010.sln 打开之后运行报错:是一个对话框
指定的文件的格式无法识别或为不支持的二进制。 这个物理引擎的库文件无法识别

•or open cocos2d-win32 sln file and build the solution in IDE.
◦The cocos2d-win32.vc2008.sln is the vc2008 solution for win32.
◦The cocos2d-win32.vc2010.sln is the vc2010 solution for win32.


Hi, I have the same problem. I’ve done everything according to the tutorial, but it still says “unable to open application: cannot open file ’libcocos2d.lib unrecognized binary format”. There were a lot of warnings during build using the bat.


Because ‘libcocos2d.lib’ not befinded by the project,you should copy ‘libcocos2d.lib’ to your project’s directory,and other *lib file too….



yes, or you could set the output directory to the debug directory in your project’s configuration properties.

for more information, you could refer to Cocos2d-x Application Wizard for Visual Studio User Guide(

btw, the tutorials have been upgraded to 0.9.1 last week.


Nope no help; “Unable to start program blah blah libcocos2d.lib The specified file is an unrecognized or unsupported binary format” When I F5 in VS2010. Some warnings on missing pngs and error if I start from the exe.


You should copy .dll file to directory wherelib there, too


I’ve literally copied all the content of release.win32 to every folder in testgame project folder, even in debug.win32 didn’t help at all.


I consider that because it lacks libcocos2d.dll and others, it is error.
check your file path……

Sorry,my English is so bad,and I think you should learn Chinese.
Where are you from?


The DLLs are there and I don’t think I need to learn chinese.


or you could set the output directory to the debug directory in your project’s configuration properties.

the path,the path


Of the project? Did that. Didn’t work.

Oh now it works, I set it as startup project.

‘test’ don’t build though. some mismatch thing 0.o’


Hi, I have the same problem too. Anyone could help to demonstration set it as startup project.


I know this is 6 years later, but I ran into the same problem. It turns out that when I unloaded my project in the solution, VS auto-chose cocos2dx as the default Startup Project, so re-loading my own project and setting that as the Startup project solved this for me. Here’s an image showing you where it is in the Solution Explorer