calling C/C++ from a Lua-based plugin

  • Thread starter Thread starter music guy
  • Start date Start date
Status
Not open for further replies.
M

music guy

Guest
So I got the Export SDK, and I'm playing around with it.

I've read the stuff online about how to call C/C++ from Lua, but I don't think I have the big picture here yet.

I see how to write the code so Lua can use it. I see how to call it from Lua.

But what I don't get is how to tell Lua about a library I have that I want it to call? I assume the .lib needs to be in the folder with all the .lua files, but how do I tell it that it can find those calls in there?

Thanks in advance...
 
Actually, section 26.2 of the Lua docs explains this, but I'm beginning to think that the LR Lua interpreter doesn't allow dynamic loading.
 
In case anyone else is trying this, I seem to have confirmed that LR doesn't allow dynamic binding. I have my lib working from the standalone Lua interpreter, but my plugin won't load in LR with it.

I got an idea from looking at LRMogrify, though - I can make my lib be an
executable, and call it from LrTasks.execute. It's a little less slick (esp. for passing arguments), but I think it should work for what I need.
 
Status
Not open for further replies.
Back
Top