Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Using a C library.
Started by prographodeveloper Aug 31 2018 05:24 AM

4 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

prographodeveloper

[GLOBAL: userInfoPane.html]
prographodeveloper
  • Contributor

  • 266 posts
  • Corona SDK

I have a library of functions written in C; specialMaths.a and it's header specialMaths.h

 

The specialMaths.a has been compiled for Android and IOS.

 

How do I call these functions from my program?

 

Do I need to make a plugin? or is there an easier way?



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,253 posts
  • Corona SDK

You need to make that into a plugin or use the native build process.



[TOPIC: post.html]
#3

prographodeveloper

[GLOBAL: userInfoPane.html]
prographodeveloper
  • Contributor

  • 266 posts
  • Corona SDK

Which is easier?



[TOPIC: post.html]
#4

prographodeveloper

[GLOBAL: userInfoPane.html]
prographodeveloper
  • Contributor

  • 266 posts
  • Corona SDK

I tried the basic example, which has App and Plugin, it built, but I don't see an .apk or java library or anything.

 

Is there a simple step-by-step tutorial to make a plugin for Android and IOS?

 

According to this it looks kind of easy https://docs.coronalabs.com/native/plugin/index.html#native-c

 

But how exactly? I guess I have to compile and link that - against what? where do I get the libraries and the headers? And what do I do with the .a or .so file?



[TOPIC: post.html]
#5

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,253 posts
  • Corona SDK

Doing the native build is easier and will get you to your goal more quickly.

 

I can't help you with the how.  Just keep pluging away reading the docs.




[topic_controls]
[/topic_controls]