Murga-Projects Forums
C/Invoke - Printable Version

+- Murga-Projects Forums (http://www.murga-projects.com/forum)
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: C/Invoke (/showthread.php?tid=330)


C/Invoke - asafp - 07-18-2008 04:35 AM

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?


RE: C/Invoke - JohnMurga - 07-18-2008 07:38 PM

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


RE: C/Invoke - asafp - 07-19-2008 05:57 AM

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