Using LuaInterface - ERROR_DLL_INIT_FAILED

3

I've been trying to integrate Lua into my managed code, using LuaInterface. I'm using the lua51.dll that came with the assembly I downloaded, but when I try to create a new Lua object, the constructor fails with ERROR_DLL_INIT_FAILED, or HRESULT 0x8007045A. I checked that I'm building as x86. What else can be the problem?

c#
dll
lua
asked on Stack Overflow Aug 3, 2010 by Puppy

3 Answers

1
  1. Maybe you are mixing 32 bit and 64 bit ?
  2. Is it possible that you might have a different version in your path ?
  3. Try running with elevated privileges.
  4. Check your DLL with Dependency Walker
answered on Stack Overflow Aug 4, 2010 by Romain Hippeau • edited Aug 4, 2010 by Romain Hippeau
0

I think the fastest way of solving this is...

Try to get a new Lua library here:

http://luabinaries.sourceforge.net/

Test with this new one and see if the problem disappears.

answered on Stack Overflow Aug 3, 2010 by Leniel Maccaferri
0

Just to make sure you're compiling as 32bit, add x86 to your csproj file's .

I had a similar issue, but I would like to guess you're not as stupid as me to only think you're compiling as 32 bit when it's actually compiling as 64bit..

answered on Stack Overflow Aug 17, 2010 by Blam

User contributions licensed under CC BY-SA 3.0