[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: LUA 5.1.1 in Visual Studio 2005
- From: Jon Radoff <admin@...>
- Date: Sat, 2 Sep 2006 10:30:45 -0700 (PDT)
I'm using Visual Studio 2005 (MSVC++ 8).
First, I should note that I was able to get Lua 5.0.3
to compile rather easily. It took about ten minutes
of work, setting up the solution file. It compiles
and links fine, and I can use the "lua" interpreter
without any apparent issues.
5.1.1 is another story. I'm able to get it to compile
fine, but the "lua" program won't work properly. I
get the following message:
LUA: unable to get ModuleFileName
I composed a simple test program, which produces a
similar problem. See below...
----cut----
#include <stdio.h>
extern "C" {
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
/* the Lua interpreter */
lua_State* L;
int main ( int argc, char *argv[] )
{
/* initialize Lua */
L = lua_open();
/* load all libraries */
luaL_openlibs(L);
/* cleanup Lua */
lua_close(L);
return 0;
}
----cut----
This produces the following (similar) output:
PANIC: unprotected error in call to Lua API (unable to
get ModuleFileName)
Other notes:
I'm using static linking in both 5.0.3 and 5.1.1. I
don't see any differences.
Can anyone share some suggestions, or perhaps a Visual
Studio 2005 solution file for building 5.1.1? (It
appears that the solutions files for MSVC that are
linked to from the LUA website are specific to 5.0.x).
Jon