Creating an cross-platform extension issue

Home / Forums / Marmalade Archive / EDK / Creating an cross-platform extension issue
1 reply [Last post]
by: Christopher Lord
Status: Offline
Joined: 2012-06-27

Hi,

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:
mkb SyncLib/SyncLib_iphone.mkb

Please also let me know if there is a better way to approach this.

Thanks,
Chris

by: Rocifier
Status: Offline
Joined: 2011-04-05
Hi it looks like you have two

Hi it looks like you have two issues

Issue 1: "Archive has no index; run ranlib to add one"
This is not a marmalade problem, it is a cross-compile problem. I suggest google the error.

Issue 3: Extension Design
I don't really know enough to give good advice on this, but from what I've read EDK is pretty much the only way to go for cross-platform.

Latest Posts

Latest Comments

Top Contributors

  • amanda
  • riaan
  • alexand3
  • alexand4
  • alexand7
  • alexand889
  • alexand12191
  • remote9991
  • remote9992
  • test