We have a static library containing some network code (and sources), which we currently have platform independent already (through the use of ifdef's). Our problem is that we are trying to get this library in use on a cross-platform project (iPhone/Android/Win/etc). When we initially tried just an inclusion of the .a itself (for iOS) we ended up with an error stating:
could not read symbols: Archive has no index; run ranlib to add one
We then decided we'd have to approach this the marmalade-way and do an extension using the EDK. I went through the EDK NewMessageBox tutorial process to make our own SyncLib_iphone.mkb and got it to a building phase (few issues with scones/xcode-select, but otherwise good). We added this as an extension, fixed some build errors however, even now, we get the same error listed above.
I can see the Photon libraries end results, and notice that they have an /arm/ and /x86/ directory in their /libs/ directory, while this only contains /iphone/. This, to me, indicates that we might be approaching this wrongly. So in summary, is creating an extension the best way to get our code in? Is there something obviously wrong from following the NewMessageBox tutorial, or are there some final steps I am missing?
We have the sources and header files, an s4e file and examples of this working on windows (without EDK).
I started the project on OSX with the following command:
python builder/make_extension.py SyncLib/SyncLib.s4e --platform=iphone
Building is successful with:
Please also let me know if there is a better way to approach this.