Any way to access an external C code/library

Someone else asked this, but no reply.

I also have this requirement. Is this feature likely to be added in the near future?

Thanks

[import]uid: 5809 topic_id: 696 reply_id: 300696[/import]

Sorry, we are not supporting external libraries at the moment due to the multiplatform support. We have gotten lots of request for this, so we will be adding it in our review pile.

Thanks

Carlos [import]uid: 24 topic_id: 696 reply_id: 1388[/import]

Hi Carlos, I am actually only interested in extending corona using c/obj-c, not in external libraries. Is there a way to call external c funtions?

Thanks in advance.

PLS [import]uid: 5899 topic_id: 696 reply_id: 1435[/import]

Not right at this moment… we are adding it into our review and will explore in upcoming releases.

Carlos [import]uid: 24 topic_id: 696 reply_id: 1444[/import]

Thank you for the quick answer Carlos.

Looking at Corona as a product, knowing what you made public about your roadmap, you really need this. The two reasons why you should consider this “sooner” rather than later:

  • I’s the way to open your sdk to everything else specific to a certain platform it “currently” does not support. This way users (or third parties) can create their own “modules” for everything you have not bridged into the lua api, in-app purchase, peer-to-peer bluetooth networking, etc. I am pretty sure a bunch of snippets of code obj-c would pop-up all over with the code that brings to the lua api a bunch of platform specific stuff. And since you are going to support more platforms, the less you “really gotta support” that is platform specific the better, and it’s certain that it will always be an uphill battle against new features form apple/google. Integration of the sdk with external code should be part of the solution.

  • Some thing are just easier to code in other languages, easier to find code samples, or better covered in books. Path finding, encryption, parsers & data structures, networking, etc. There is no point in locking your customers to the lua api and all the stuff you were able to get into it (which by definition will always be a very limited amount of stuff, no matter how fast and hard working your team is).

Ok, I made my point, I am in no hurry whatsoever, I take what I bought “as is” and will use it for whatever project it looks as a good cross-platform solution (right now I am just fooling around and learning Lua for the fun of adding another high level language to the huge 15 year old pile of stuff I am familiar with).

PLS

[import]uid: 5899 topic_id: 696 reply_id: 1460[/import]

I have to agree with Paulo that giving us access to extensions via Lua’s simple C interface would be very beneficial. I realize that you would have to put caveats on it (e.g. accessing UIKit) and it would be iPhone/iPad specific. [import]uid: 1813 topic_id: 696 reply_id: 1508[/import]

Yes. Since we are working on the Android platform as well, we are trying to make things simpler. Future releases will probably include ability to add extensions to both Android and Apple devices… (ipad,itouch,iphone)…

C [import]uid: 24 topic_id: 696 reply_id: 1526[/import]

you might be able to fully facilitate it for iphone os with Alien, a MIT-licensed lua wrapper around libffi [import]uid: 5626 topic_id: 696 reply_id: 1546[/import]