VC + + compiled LUA library cannot parse Lua symbol problem

Source: Internet
Author: User
Tags lua

VC compiled LUA library error:

Error 36error lnk1120:21 an unresolved external command C:\Users\luozhuang\Desktop\onscripter-20120416VC\Release\ Onscripter.exeonscripter error 19error LNK2019: unresolved external symbol "Char const * __cdecl lua_tolstring (struct lua_state *,int, unsigned int *) "([email protected]@[email protected]@[email protected]), the symbol in the function" Public:int __thiscall Luahandler:: CallFunction (Bool,char const *) "([email Protected]@@[email protected]) is referenced in C:\Users\luozhuang\Desktop\ Onscripter-20120416vc\luahandler.objonscripter error 32error LNK2019: unresolved external symbol "Char const * __cdecl lual_checklstring ( struct lua_state *,int,unsigned int *) "([email protected]@[email protected]@[email protected]), the symbol in the function" Public:bool __th Iscall luahandler::iscallbackenabled (int) "(?

[email Protected]@@[email protected]) is referenced in C:\Users\luozhuang\Desktop\onscripter-20120416VC\ Luahandler.objonscripter error 29error LNK2019: unresolved external symbol "int __cdecl lua_error (struct lua_state *)" ([Email protected]@[ Email protected]@@z), the symbol in the function "Public:bool __thiscall luahandler::iscallbackenabled (int)" ([Email Protected]@@[email Protected]) is referenced in C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.objonscripter error 28error LNK2019: unresolved external symbol "int __cdecl lua_pcall (struct lua_state *,int,int,int)" (?

[Email protected]@[email protected]@[email protected]). The symbol is in the function "Public:void __thiscall Luahandler::init (class ONScripter *,class Scripthandler *)" (?

[Email protected]@@[email protected]@[email protected]@@z) is referenced C:\Users\luozhuang\Desktop\onscripter-20120416VC\ Luahandler.objonscripter error 18error LNK2019: unresolved external symbol "int __cdecl lua_toboolean (struct lua_state *,int)" (?

[email protected]@[email protected]@[email protected]), the symbol in the function "Public:bool __thiscall LUAHandler:: Referenced in iscallbackenabled (int) "([email protected]@@[email protected]) C:\Users\luozhuang\Desktop\ Onscripter-20120416vc\luahandler.objonscripter error 17error LNK2019: unresolved external symbol "int __cdecl lua_tointeger (struct Lua_ State *,int) "([email protected]@[email protected]@[email protected]), the symbol in the function" Public:bool __ ThisCall luahandler::iscallbackenabled (int) "([email protected]@@[email protected]) is referenced C:\Users\ Luozhuang\desktop\onscripter-20120416vc\luahandler.objonscripter error 33error LNK2019: unresolved external symbol "int __cdecl Lual_ Checkinteger (struct lua_state *,int) "([email protected]@[email protected]@[email protected]), The symbol is in the function "Public:bool __thiscall luahandler::iscallbackenabled (int)" ([email protected]@@[email protected] ) referenced in C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.objonscripter error 34error LNK2019: unresolved external symbol "INT __" CDecL lual_loadbuffer (struct lua_state *,char const *,unsigned Int,char const *) "([email protected]@[email  Protected]@[email protected]), the symbol in the function "Public:void __thiscall Luahandler::init (class ONScripter *,class Scripthandler *) "([Email protected]@@[email protected]@[email protected]@@z) is referenced in C:\Users\ Luozhuang\desktop\onscripter-20120416vc\luahandler.objonscripter error 35error LNK2019: unresolved external symbol "struct lua_state * __ Cdecl lual_newstate (void) "([email protected]@[email protected] @XZ). The symbol is in the function "Public:void __thiscall Luahandler::init (class ONScripter *,class Scripthandler *)" (?

[Email protected]@@[email protected]@[email protected]@@z) is referenced C:\Users\luozhuang\Desktop\onscripter-20120416VC\ Luahandler.objonscripter error 15error LNK2019: unresolved external symbol "void __cdecl lua_close (struct lua_state *)" (?

[Email Protected]@[email protected]@@z). The symbol is in the function "public: __thiscall luahandler::~luahandler (void)" (?

[email Protected]@[email protected]) is referenced in C:\Users\luozhuang\Desktop\onscripter-20120416VC\ Luahandler.objonscripter error 26error LNK2019: unresolved external symbol "void __cdecl lua_getfield (struct lua_state *,int,char const *)" ([ Email protected]@[email protected]@[email protected]), the symbol in the function "Public:int __thiscall luahandler::callfunction (bool, Char const *) "([email Protected]@@[email protected]) is referenced in C:\Users\luozhuang\Desktop\onscripter-20120416VC\ Luahandler.objonscripter error 24error LNK2019: unresolved external symbol "void __cdecl lua_pushboolean (struct lua_state *,int)" (?

[email protected]@[email protected]@[email protected]), which is in the function "Public:bool __thiscall Referenced in luahandler::iscallbackenabled (int) "([email protected]@@[email protected]) C:\Users\luozhuang\ Desktop\onscripter-20120416vc\luahandler.objonscripter error 22error LNK2019: unresolved external symbol "void __cdecl Lua_pushinteger ( struct lua_state *,int) "([email protected]@[email protected]@[email protected]), the symbol in the function" public: BOOL __thiscall luahandler::iscallbackenabled (int) "(?

Referenced in [email protected]@@[email protected]) C:\Users\luozhuang\Desktop\onscripter-20120416VC\ Luahandler.objonscripter error 25error LNK2019: unresolved external symbol "void __cdecl lua_pushlightuserdata (struct lua_state *,void *)" ([ Email protected]@[email protected]@[email protected]), the symbol in the function "Public:void __thiscall LUAHandler:: Init (class ONScripter *,class Scripthandler *) "([email protected]@@[email protected]@[email  PROTECTED]@@Z) referenced in C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.objonscripter error 21error LNK2019: unresolved external symbol "void __cdecl lua_pushnumber (struct lua_state *,double)" ([email protected]@[email protected]@[ Email protected]). The symbol is in the function "Public:bool __thiscall luahandler::iscallbackenabled (int)" ([email protected]@@[email protected] ) referenced in C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.objonscripter error 23error LNK2019: unresolved external symbol "void _" _cdecl lua_pushstring (struct lua_state *,char const *) "([email protected]@[email protected]@[email protected]), the symbol in the function "Public:bool __thiscall luahandler::iscallbackenabled (int)" Referenced in ([email protected]@@[email protected]) C:\Users\luozhuang\Desktop\onscripter-20120416VC\ Luahandler.objonscripter error 16error LNK2019: unresolved external symbol "void __cdecl lua_pushvalue (struct lua_state *,int)" (?

[Email protected]@[email protected]@[email protected]). The symbol is in the function "Public:void __thiscall Luahandler::init (class ONScripter *,class Scripthandler *)" (Email protected]@@[email PR Otected]@[email protected]@@z) is referenced in C:\Users\luozhuang\Desktop\onscripter-20120416VC\ Luahandler.objonscripter error 27error LNK2019: unresolved external symbol "void __cdecl lua_setfield (struct lua_state *,int,char const *)" (?

[Email protected]@[email protected]@[email protected]), the symbol in the function "Public:void __thiscall Luahandler::init (class ONScripter *,class Scripthandler *) "(?

[Email protected]@@[email protected]@[email protected]@@z) is referenced C:\Users\luozhuang\Desktop\onscripter-20120416VC\ Luahandler.objonscripter error 30error LNK2019: unresolved external symbol "void __cdecl lual_openlibs (struct lua_state *)" ([email protected ]@[email protected]@@z). The symbol is in the function "Public:void __thiscall Luahandler::init (class ONScripter *,class Scripthandler *)" (?

[Email protected]@@[email protected]@[email protected]@@z) is referenced C:\Users\luozhuang\Desktop\onscripter-20120416VC\ Luahandler.objonscripter error 31error LNK2019: unresolved external symbol "void __cdecl lual_register (struct lua_state *,char const *,STRUCT Lual_reg const *) "([email protected]@[email protected]@[email protected]@@z). The symbol is in the function "Public:void __thiscall Luahandler::init (class ONScripter *,class Scripthandler *)" (Email protected]@@[email PR Otected]@[email protected]@@z) is referenced in C:\Users\luozhuang\Desktop\onscripter-20120416VC\ Luahandler.objonscripter error 20error LNK2019: unresolved external symbol "void const * __cdecl lua_topointer (struct lua_state *,int)" ([ Email protected]@[email protected]@[email protected]), the symbol in the function "Public:bool __thiscall luahandler::iscallbackenabled ( int) "([email Protected]@@[email protected]) is referenced in the C:\Users\luozhuang\Desktop\onscripter-20120416VC\ Luahandler.objonscripter



WORKAROUND: Because it is a C + + project. The LUA header file referenced by EXE must be written like this:

extern "C" {#include <lua.h>}

extern "C" {#include <lualib.h> #include <lauxlib.h>}

VC + + compiled LUA library cannot parse Lua symbol problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.