[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Visual c++ and LUA
- From: "Jim Jones" <jjones@...>
- Date: Thu, 5 Sep 2002 16:51:25 -0500
Make sure that you have the appropriate LUA source files added to the
project.
If its an MFC based app, be sure to turn off precompiled headers for the LUA
cpp's.
Jim
----- Original Message -----
From: "funkstar_lua_start" <coner@webmail.co.za>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Thursday, September 05, 2002 4:40 PM
Subject: Visual c++ and LUA
> Hi guys,
>
> i want to use lua to do some work for me - i use it as a teaching tool
> for students but i seem to be stuck using it myself...
>
> Just tried to do something basic
> /* file named impcan.cpp*/
>
> #include <lua.h>
> #include <lualib.h>
> #include <lauxlib.h>
>
> void main()
> {
> int status;
> lua_State *L;
> L = lua_open(1000);
> lua_baselibopen(L);
> lua_iolibopen(L);
> lua_strlibopen(L);
> lua_mathlibopen(L);
> status = lua_dofile(L,"test.lua");
> printf("Status: %i",status);
> lua_close(L);
> }
> When i compile it i get no errors but,
> when trying to build it i receive the following...
>
> impcan.obj : error LNK2001: unresolved external symbol "void __cdecl
> lua_close(struct lua_State *)" (?lua_close@@YAXPAUlua_State@@@Z)
> impcan.obj : error LNK2001: unresolved external symbol "int __cdecl
> lua_dofile(struct lua_State *,char const *)"
> (?lua_dofile@@YAHPAUlua_State@@PBD@Z)
> impcan.obj : error LNK2001: unresolved external symbol "void __cdecl
> lua_mathlibopen(struct lua_State *)"
> (?lua_mathlibopen@@YAXPAUlua_State@@@Z)
> impcan.obj : error LNK2001: unresolved external symbol "void __cdecl
> lua_strlibopen(struct lua_State *)" (?lua_strlibopen@@YAXPAUlua_State@@@Z)
> impcan.obj : error LNK2001: unresolved external symbol "void __cdecl
> lua_iolibopen(struct lua_State *)" (?lua_iolibopen@@YAXPAUlua_State@@@Z)
> impcan.obj : error LNK2001: unresolved external symbol "void __cdecl
> lua_baselibopen(struct lua_State *)"
> (?lua_baselibopen@@YAXPAUlua_State@@@Z)
> impcan.obj : error LNK2001: unresolved external symbol "struct
> lua_State * __cdecl lua_open(int)" (?lua_open@@YAPAUlua_State@@H@Z)
> Debug/impcan.exe : fatal error LNK1120: 7 unresolved externals
> Error executing link.exe.
>
> impcan.exe - 8 error(s), 0 warning(s)
> i haven't used c++ in for a while now an i can't quite remember what
> to make of the feedback the building gives...
>
> any input is appreciated...
>
> thanx,
> Hansie