Using Dylibs in LiveCode?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Dylibs in LiveCode?

Geoff Canyon via use-livecode
I've got a requirement for which there's a useful library, which is made
available for MacOS as a 'dylib'.

What are my options for accessing this from LC? (I don't have a to ship an
application using this library, I just want to be access it on my own
machines, ideally within the IDE.)

TIA,

Ben

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Using Dylibs in LiveCode?

Geoff Canyon via use-livecode


> On 16 Oct 2018, at 1:29 am, Ben Rubinstein via use-livecode <[hidden email]> wrote:
>
> I've got a requirement for which there's a useful library, which is made available for MacOS as a 'dylib'.
>
> What are my options for accessing this from LC? (I don't have a to ship an application using this library, I just want to be access it on my own machines, ideally within the IDE.)

LCB is your friend here.

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Using Dylibs in LiveCode?

Geoff Canyon via use-livecode
Thanks Monte. Where can I find some documentation as to how I can use this?

Many thanks,

Ben


On 15/10/2018 22:31, Monte Goulding via use-livecode wrote:

>
>
>> On 16 Oct 2018, at 1:29 am, Ben Rubinstein via use-livecode <[hidden email]> wrote:
>>
>> I've got a requirement for which there's a useful library, which is made available for MacOS as a 'dylib'.
>>
>> What are my options for accessing this from LC? (I don't have a to ship an application using this library, I just want to be access it on my own machines, ideally within the IDE.)
>
> LCB is your friend here.
>
> Cheers
>
> Monte

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Using Dylibs in LiveCode?

Geoff Canyon via use-livecode
On Tue, Oct 16, 2018 at 5:07 AM Ben Rubinstein via use-livecode <
[hidden email]> wrote:

> Thanks Monte. Where can I find some documentation as to how I can use this?
>

This is a good document to review:

https://github.com/livecode/livecode/blob/develop/docs/guides/LiveCode%20Builder%20Language%20Reference.md

 For a working example take a look at the Sparkle.lcb file and the code
folder in the Levure App Updater Helper. It shows how to use binding
strings to link to Sparkle methods.

https://github.com/trevordevore/levurehelper-app_updater

I also have a repo with a number of macOS API experiments which may prove
useful:

https://github.com/trevordevore/lc-macos-toolset

--
Trevor DeVore
ScreenSteps
www.screensteps.com
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Using Dylibs in LiveCode?

Geoff Canyon via use-livecode
In reply to this post by Geoff Canyon via use-livecode


> On 16 Oct 2018, at 9:02 pm, Ben Rubinstein via use-livecode <[hidden email]> wrote:
>
> Thanks Monte. Where can I find some documentation as to how I can use this?

Hi Ben

Sorry for the slow response. In addition to Trevor’s comments:

The LiveCode Builder Language Reference is also available on the dictionary stack under the Guides tab. Additionally the Extending LiveCode guide also has some important information about creating extensions and developing foreign handlers for executing code from the dylib in the section `Using native APIs for libraries`.

One thing to note is that it is critically important that the native types you use in your foreign handler declaration are correct. If a foreign handler is crashing then double-check the types you have used as this is the most common reason for crashes.

I also suggest frequenting the LiveCode Builder forum http://forums.livecode.com/viewforum.php?f=93&sid=65f2754cb28e09a8d6c341ae64cb5e0e <http://forums.livecode.com/viewforum.php?f=93&sid=65f2754cb28e09a8d6c341ae64cb5e0e> and also our Gitter room which often has discussions about LCB stuff https://gitter.im/LiveCode/Lobby <https://gitter.im/LiveCode/Lobby> Indeed that’s currently the only place we have discussed how to use objective-c blocks which is a little tricky.

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Using Dylibs in LiveCode?

Geoff Canyon via use-livecode


> On 18 Oct 2018, at 8:44 am, Monte Goulding via use-livecode <[hidden email]> wrote:
>
>
>
>> On 16 Oct 2018, at 9:02 pm, Ben Rubinstein via use-livecode <[hidden email]> wrote:
>>
>> Thanks Monte. Where can I find some documentation as to how I can use this?
>
I forgot to mention examples in the repo that may be helpful:

C linking to shared libraries in the code folder:
https://github.com/livecode/livecode/tree/develop/extensions/libraries/ini <https://github.com/livecode/livecode/tree/develop/extensions/libraries/ini>
https://github.com/livecode/livecode/tree/develop/extensions/libraries/timezone <https://github.com/livecode/livecode/tree/develop/extensions/libraries/timezone>

A simple Objective-C example:
https://github.com/livecode/livecode/tree/develop/extensions/widgets/macbutton <https://github.com/livecode/livecode/tree/develop/extensions/widgets/macbutton>

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Using Dylibs in LiveCode?

Geoff Canyon via use-livecode
That's great - thanks both. I'll find some time to dive in, and will doubtless
need to come up for air either here or on the forums...

Ben

On 17/10/2018 22:49, Monte Goulding via use-livecode wrote:

>
>
>> On 18 Oct 2018, at 8:44 am, Monte Goulding via use-livecode <[hidden email]> wrote:
>>
>>
>>
>>> On 16 Oct 2018, at 9:02 pm, Ben Rubinstein via use-livecode <[hidden email]> wrote:
>>>
>>> Thanks Monte. Where can I find some documentation as to how I can use this?
>>
> I forgot to mention examples in the repo that may be helpful:
>
> C linking to shared libraries in the code folder:
> https://github.com/livecode/livecode/tree/develop/extensions/libraries/ini <https://github.com/livecode/livecode/tree/develop/extensions/libraries/ini>
> https://github.com/livecode/livecode/tree/develop/extensions/libraries/timezone <https://github.com/livecode/livecode/tree/develop/extensions/libraries/timezone>
>
> A simple Objective-C example:
> https://github.com/livecode/livecode/tree/develop/extensions/widgets/macbutton <https://github.com/livecode/livecode/tree/develop/extensions/widgets/macbutton>
>
> Cheers
>
> Monte
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode