Lua 5.1 dll error: equals sign expected on line 1?

143 views Asked by At

I have the following code:

int luaopen_Library()
{
    return 0;
}

Attempting to call require "Library" throws the following error:

Library.dll:1: '=' expected

How can I fix this? Please let me know if more information is needed; I am new to working with dlls.

1

There are 1 answers

1
lhf On BEST ANSWER

The message is telling you that Lua is trying to load the dll as a Lua program. You have probably put the dll in the path given by LUA_PATH. You need to move it to the path given by LUA_CPATH.