Murga-Projects Forums

Full Version: C/Invoke
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
http://www.nongnu.org/cinvoke/lua.html

This is a project that claims to let you call C code from lua and other languages. The doc is sketchy and there doesn't seem to be any recent binary releases that will work with lua.

I need to call a C function within a DLL from lua and I'm not a C programmer and don't want to be one.

Can anyone point me in the right direction?
Hi,

This one of the big improvements in murgaLua 0.6.8, I use Alien to provide a truly portable way of doing this.

Have a look in the most recent 0.6.8 build in :

examples/new/alien

There you can see how to call functions from a Windows dll or a Linux shared library.

Cheers
JohnM
Alien Rocks! Just tried a basic example and it worked and it's simple enough that even I can understand it.
Reference URL's