How to create library for Cocos2D-X

I want to create a library for cocos2d-x like box2D, chipmunk, etc. I want to create a library that is available for all platforms with WP8 as my primary target. My library is a custom rest library that uses curl. So the project will be dependent on curl.

I found no documentation regarding this. Please someone help me. It’s urgent

I tried putting my JNI calls in a library module, after some advice in some old thread here. No go I’m afraid. Luckily the code was so simple that I don’t mind substituting a modular, object code library with a globally included class full of transferable static functions since only I will be using it for now.

It’d be good to forget about all the code and just have headers like you have asked about. I just find it a lot of hassle getting libraries to link properly in eclipse on Windows.

This really isn’t a cocos2d-x issue at all as far as I can tell from your post.

You can do this any number of ways. Maybe one of the easiest is something like:

g++ -c source1.cpp source2.cpp

ar rvs mylibrary.a source1.o source2.o

and use -L./lib -lmyLibrary when compiling

I suggest you start with CMake and I have also create some sample projects compile box2d, chipmunk and spine to static library for various platform.