[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: help needed in using lua 5.0
- From: Eero Pajarre <epajarre@...>
- Date: Fri, 10 Oct 2003 14:01:41 +0300
sohyl siddiqui wrote:
i need help on how to use lua 5.0 with vc++ 6 i was previuosly using lua
4.0 and it was working fine till some problems arised so i decided to
try using 5.0 ...... the compiler gives following linker errors :
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other
libs; use /NODEFAULTLIB:library
You should be able to fix this by using the same options when you compile
the application as when the library is compiled.
HCScript.obj : error LNK2001: unresolved external symbol _lua_setglobal
Are you using the correct lua.h? in Lua 5.0 the lua_setglobal is a
macro in lua.h. (It was a function definition in lua.h, and this sound like you
had used the Lua4 .h file)
Alternatively: did you recompile HCScript.c after you switched lua versions?
HCScript.obj : error LNK2001: unresolved external symbol _lua_mathlibopen
HCScript.obj : error LNK2001: unresolved external symbol _lua_strlibopen
HCScript.obj : error LNK2001: unresolved external symbol _lua_iolibopen
HCScript.obj : error LNK2001: unresolved external symbol _lua_baselibopen
Error executing link.exe.
Names of these functions have been changed to something like luaopen_math
in lua5. Check the functions in the src/lib directory.
do i need to change code generation settings .... previously i was using
multithreaded dll ..... i am using the binares provided in
luabuild-5.0.gz that i got from the lua site .....
My personal suggestion is: don't use the binaries,, compile the Lua from the
sources yourself. You don't even need to make a .lib from it, you can add
the source files directly to you application build. (They compile fast).