Building error and build mode

Hi, I’m new to game and c++ programming. I never use visual studio before.
I just want to ask some things:

  1. I’m building cocos using this guide http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Cocos2d-x_Application_Wizard_for_Visual_Studio_User_Guide
    I encountered this error:

    Error 29 error LNK1181: cannot open input file ‘libExtensions.lib’ C:\cocos2d-2.1rc0-x-2.1.2\samples\Cpp\AssetsManagerTest\proj.win32\LINK AssetsManagerTest
    Error 90 error MSB3073: The command “if not exist “C:\cocos2d-2.1rc0-x-2.1.2\Release.win32” mkdir “C:\cocos2d-2.1rc0-x-2.1.2\Release.win32”
    if exist “C:\cocos2d-2.1rc0-x-2.1.2\Release.win32\CocosDragonJSRes” rd /s /q “C:\cocos2d-2.1rc0-x-2.1.2\Release.win32\CocosDragonJSRes”
    mkdir “C:\cocos2d-2.1rc0-x-2.1.2\Release.win32\CocosDragonJSRes”
    xcopy “C:\cocos2d-2.1rc0-x-2.1.2\samples\Javascript\CocosDragonJS\proj.win32…\scripting\javascript\bindings\js*.js” “C:\cocos2d-2.1rc0-x-2.1.2\Release.win32\CocosDragonJSRes” /e /Y
    xcopy “C:\cocos2d-2.1rc0-x-2.1.2\samples\Javascript\CocosDragonJS\proj.win32…\Shared\games\CocosDragonJS\Published files Android” “C:\cocos2d-2.1rc0-x-2.1.2\Release.win32\CocosDragonJSRes” /e /Y
    :VCEnd” exited with code 4. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 124 5 CocosDragonJS

But I still can build my test project, are those files that failed to compile unneccessary? I encountered the same problem when using the build-win32.bat

  1. The exe size when I build using ‘debug’ mode(Debug.win32) is 139kb while in ‘release’ mode(Release.win32) is 71kb. Why the sizes are different? Can you tell me what are the differences between those two? The only difference I see is the debug version has window resolution in title. When I want to develop the game, which mode should I use?

I’m using windows 7 64 bit with cocos 2.1.2-hotfix and visual 2012 studio express.

I’m experiencing the same problem. Do not know if it’s important or not, but the resulting test programs (testsomething.exe) do not work properly (some of them won’t execute, some will only show a black window).

Any ideas?

I got the same errors.
Build the libExtensions project, that will solve the first error.
After that all projects buid but CocosDragonJS.
Running the binaries of the test programs still show black windows to me, but if you run them directly on Visual Studio they’ll work

Gil Costa wrote:

I got the same errors.
Build the libExtensions project, that will solve the first error.
After that all projects buid but CocosDragonJS.
Running the binaries of the test programs still show black windows to me, but if you run them directly on Visual Studio they’ll work

I’ll give it a try when I come home tonight, thanks.

Is this ok, though? If binaries do not work properly, is the library properly built? I wouldn’t like to start a development just to find later that it doesn’t work because the library is borked.

The point is, I’m unexperienced enough to have to deal with lot of difficulties while I learn, do not want to have also a library putting sticks in my wheels XD XD XD

Same problem I get, I found the code of preBuild, there is “xcopy”$(ProjectDir)…files Android" “$(OutDir) /e /Y”, then I check out the address “$(ProjectDir)… there is not a folder named “Published files Android”。earse the code from prebuild,the project would be biuld success,but I dont know what the missing folder used for,hoping some one can give the right answer

Hi all, I just have time to test cocos again, I changed my visual studio to 2010 and all the files now compiled successfully.

Even though it’s free engine, I’m surprised there’s no one from cocos answer here.

for some reason the folders WatermelonWithMe and CocosDragonJS @ were not in cocos2d-x-2.1.4.zip, you can download them from the github repo https://github.com/minggo/cocos2d-js-tests/tree/for-cocos2dx/games

game dev wrote:

for some reason the folders WatermelonWithMe and CocosDragonJS @ samplesJavascriptSharedgames were not in cocos2d-x-2.1.4.zip, you can download them from the github repo https://github.com/minggo/cocos2d-js-tests/tree/for-cocos2dx/games

the release note said they’re removed because of size restriction
http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Release_Note_v214