[JW Lua] Loading C libraries

Robert Patterson robert at robertgpatterson.com
Sun Sep 12 22:33:29 CEST 2021


I finally figured out that indeed it is not possible to load C modules in
JW Lua, at least on Mac. I imagine this is because JW Lua embeds the Lua
source code in the build of the plugin and it does not have the
preprocessor define enabled that permits loading of dynamic libraries.

The good news is, if we can ever get a rebuild of JW Lua, it is trivial to
add this preprocessor directive so that dynamic libraries *can* load. I
have made it work in a test plugin I've written that embeds the lua
language. (Of course, my test plugin does not have the PDF Framework
embedded, so it isn't of any use with JW Lua scripts.)


On Fri, Oct 2, 2020 at 11:01 AM Thomas Weber <thomas.weber at notengrafik.com>
wrote:

> I have written C modules for loading with Lua in other contexts, but
> unfortunately, they will not load with JWLua.
>
> Am 2. Oktober 2020 17:22:38 MESZ schrieb Robert Patterson <
> robert at robertgpatterson.com>:
>>
>> The Lua language has details for how to create a C/C++ DLL module that
>> Lua can load and call (with "require"). Does anyone know if JW Lua supports
>> this?
>>
>>
>>
> --
> Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20210912/60f2fcef/attachment.html>


More information about the JWLua mailing list