Search code examples
androidwindowsvisual-studio-2010cocos2d-x

Cocos2dx (version : cocos2d-2.1rc0-x-2.1.2) No libcocos2d.so, libbox2d.so, libcocosdenshion made


I made a sample project on Windows 7, Visual Studio Ultimate 2010 with a background and sound playing on loop . It builds, compiles and runs fine in VS 2010.

But when I am trying to compile it for Android, it compiles fine with no errors. But when I import it in the Eclipse Juno workspace, I see only libgame.so in the libs->armeabi folder.

Unlike the previous versions, there is no libcocos2d.so, libbox2d.so, libcocosdenshion.so made.

static { System.loadLibrary("game"); }

The application runs fine, but I CANNOT hear sound like in Windows build ? I think I need to add cocosdenshion library but it is not made.

I do see libcocos2d.a, libbox2d.a, libcocosdenshion.a in obj->local->armeabi folder. Can someone tell me how to fix this problem so that I can hear sound ?

P.S. I think its a problem of shared and static libraries. In previous versions of cocos2dx these libraries were shared and now they are static.

Any help would be appreciated . Thanks.


Solution

  • I have solved this problem through recompiling.

    In the new version we don't need to add any library libcocos2d.so, libbox2d.so, libcocosdenshion.so

    static { System.loadLibrary("game"); } works fine.