lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi. I'm using Visual C++ 6 and trying to compile a very simple program
that makes use of the Lua precompiled binaries for Windows/VC6:

#include <lua.h>
int main() { 
  lua_State *s = lua_open(256);
  return 0;

The VC6 linker complains that it can't find lua_open():

lua.obj : error LNK2001: unresolved external symbol "struct lua_State * __cdecl 
lua_open(int)" (?lua_open@@YAPAUlua_State@@H@Z)
Debug/lua.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

I tried using the libs in the "windows/vc6" directory in the Lua FTP. I have
included lua.lib and lualib.lib in Project >> Settings >>
Linker >> Object/Library modules, and added the directory path of the
libs in Tools >> Options >> Directories >> Library files.

Could someone "hold my hand" and tell me what files I need from the
Lua FTP, where to put them, and how to setup VC6 to use them so it
can compile this simple pre-hello-world example?


- Fabio