Skip to main content
GameDev.net gamedev.net
🔒 Locked

Trouble in using Lua in C#

Started by outsky Jul 1, 2012 at 2:30 PM 1 replies 3k views
Original Post
outsky
outsky
Hi, I tried to use Lua in C#, but got Unhandled Exception which said can't load luanet.dll when run the compiled program(See the screenshot below).
[attachment=9736:cmd.png]

Environment: MS Visual Studio 2010, Lua5.1

I followed this article(http://www.godpatterns.com/2006/05/scripting-with-lua-in-c.html), and also copied luanet.dll to my project's bin/Debug dictionary.

How could that happen?
Thanks!
NetGnome
NetGnome
May want to look into any DLR implementations of Lua for .NET. I believe there is one out there called Nua, but it never really made it... there may be a couple others out there...

Your specific issue looks like an issue with having to wrap the non-managed dll (perhaps you missed an appropriate dll declaration or attribute tag). If you used a DLR implementation, it would require no messy wrapping on your part.
Endurion
Endurion
The executable tries to find luanet.dll, if you run it from the IDE, put the .dll in the release/debug folders
Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.