• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Dark mode now has a single preference for the whole site! It's a simple toggle switch in the bottom right-hand corner of any page. As it uses a cookie to store your preference, you may need to dismiss the cookie banner before you can see it. Any problems, please let us know!

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

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