News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
C/Invoke
Author Message
asafp
Member
***


Posts: 81
Group: Registered
Joined: Jan 2008
Status: Offline
Reputation: 0
Post: #1
C/Invoke

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?

07-18-2008 04:35 AM
Visit this user's website Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #2
RE: C/Invoke

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

07-18-2008 07:38 PM
Visit this user's website Find all posts by this user Quote this message in a reply
asafp
Member
***


Posts: 81
Group: Registered
Joined: Jan 2008
Status: Offline
Reputation: 0
Post: #3
RE: C/Invoke

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

07-19-2008 05:57 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: