1. 程式人生 > >VC++編譯lua庫 無法解析lua符號問題

VC++編譯lua庫 無法解析lua符號問題

dsm div number blog reg gist html name dpa

VC編譯lua庫 出現錯誤:

錯誤	36	error LNK1120: 21 個無法解析的外部命令	C:\Users\luozhuang\Desktop\onscripter-20120416VC\Release\onscripter.exe	onscripter
錯誤	19	error LNK2019: 無法解析的外部符號 "char const * __cdecl lua_tolstring(struct lua_State *,int,unsigned int *)" (?lua_tolstring@@YAPBDPAUlua_State@@[email protected]
/* */),該符號在函數 "public: int __thiscall LUAHandler::callFunction(bool,char const *)" ([email protected]@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 32 error LNK2019: 無法解析的外部符號 "char const * __cdecl luaL_checklstring(struct lua_State *,int,unsigned int *)" (?luaL_checklstring@@YAPBDPAUlua_State@@[email protected]
/* */),該符號在函數 "public: bool __thiscall LUAHandler::isCallbackEnabled(int)" (?

[email protected]@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 29 error LNK2019: 無法解析的外部符號 "int __cdecl lua_error(struct lua_State *)" (?lua_error@@YAHPAUlua_State@@@Z),該符號在函數 "public: bool __thiscall LUAHandler::isCallbackEnabled(int)" ([email protected]

/* */@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 28 error LNK2019: 無法解析的外部符號 "int __cdecl lua_pcall(struct lua_State *,int,int,int)" (?

lua_pcall@@YAHPAUlua_State@@[email protected])。該符號在函數 "public: void __thiscall LUAHandler::init(class ONScripter *,class ScriptHandler *)" (?

[email protected]@@QAEXPAVONScripter@@PAVScriptHandler@@@Z) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 18 error LNK2019: 無法解析的外部符號 "int __cdecl lua_toboolean(struct lua_State *,int)" (?

lua_toboolean@@YAHPAUlua_State@@[email protected]),該符號在函數 "public: bool __thiscall LUAHandler::isCallbackEnabled(int)" ([email protected]@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 17 error LNK2019: 無法解析的外部符號 "int __cdecl lua_tointeger(struct lua_State *,int)" (?lua_tointeger@@YAHPAUlua_State@@[email protected]),該符號在函數 "public: bool __thiscall LUAHandler::isCallbackEnabled(int)" ([email protected]@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 33 error LNK2019: 無法解析的外部符號 "int __cdecl luaL_checkinteger(struct lua_State *,int)" (?luaL_checkinteger@@YAHPAUlua_State@@[email protected]),該符號在函數 "public: bool __thiscall LUAHandler::isCallbackEnabled(int)" ([email protected]@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 34 error LNK2019: 無法解析的外部符號 "int __cdecl luaL_loadbuffer(struct lua_State *,char const *,unsigned int,char const *)" (?luaL_loadbuffer@@YAHPAUlua_State@@[email protected]),該符號在函數 "public: void __thiscall LUAHandler::init(class ONScripter *,class ScriptHandler *)" ([email protected]@@QAEXPAVONScripter@@PAVScriptHandler@@@Z) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 35 error LNK2019: 無法解析的外部符號 "struct lua_State * __cdecl luaL_newstate(void)" (?luaL_newstate@@YAPAUlua_State@@XZ)。該符號在函數 "public: void __thiscall LUAHandler::init(class ONScripter *,class ScriptHandler *)" (?

[email protected]@@QAEXPAVONScripter@@PAVScriptHandler@@@Z) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 15 error LNK2019: 無法解析的外部符號 "void __cdecl lua_close(struct lua_State *)" (?

lua_close@@YAXPAUlua_State@@@Z)。該符號在函數 "public: __thiscall LUAHandler::~LUAHandler(void)" (?

?1LUAHandler@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 26 error LNK2019: 無法解析的外部符號 "void __cdecl lua_getfield(struct lua_State *,int,char const *)" (?lua_getfield@@YAXPAUlua_State@@[email protected]),該符號在函數 "public: int __thiscall LUAHandler::callFunction(bool,char const *)" ([email protected]@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 24 error LNK2019: 無法解析的外部符號 "void __cdecl lua_pushboolean(struct lua_State *,int)" (?

lua_pushboolean@@YAXPAUlua_State@@[email protected]),該符號在函數 "public: bool __thiscall LUAHandler::isCallbackEnabled(int)" ([email protected]@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 22 error LNK2019: 無法解析的外部符號 "void __cdecl lua_pushinteger(struct lua_State *,int)" (?lua_pushinteger@@YAXPAUlua_State@@[email protected]),該符號在函數 "public: bool __thiscall LUAHandler::isCallbackEnabled(int)" (?

[email protected]@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 25 error LNK2019: 無法解析的外部符號 "void __cdecl lua_pushlightuserdata(struct lua_State *,void *)" (?lua_pushlightuserdata@@YAXPAUlua_State@@[email protected]),該符號在函數 "public: void __thiscall LUAHandler::init(class ONScripter *,class ScriptHandler *)" ([email protected]@@QAEXPAVONScripter@@PAVScriptHandler@@@Z) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 21 error LNK2019: 無法解析的外部符號 "void __cdecl lua_pushnumber(struct lua_State *,double)" (?lua_pushnumber@@YAXPAUlua_State@@[email protected])。該符號在函數 "public: bool __thiscall LUAHandler::isCallbackEnabled(int)" ([email protected]@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 23 error LNK2019: 無法解析的外部符號 "void __cdecl lua_pushstring(struct lua_State *,char const *)" (?lua_pushstring@@YAXPAUlua_State@@[email protected]),該符號在函數 "public: bool __thiscall LUAHandler::isCallbackEnabled(int)" ([email protected]@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 16 error LNK2019: 無法解析的外部符號 "void __cdecl lua_pushvalue(struct lua_State *,int)" (?

lua_pushvalue@@YAXPAUlua_State@@[email protected])。該符號在函數 "public: void __thiscall LUAHandler::init(class ONScripter *,class ScriptHandler *)" ([email protected]@@QAEXPAVONScripter@@PAVScriptHandler@@@Z) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 27 error LNK2019: 無法解析的外部符號 "void __cdecl lua_setfield(struct lua_State *,int,char const *)" (?

lua_setfield@@YAXPAUlua_State@@[email protected]),該符號在函數 "public: void __thiscall LUAHandler::init(class ONScripter *,class ScriptHandler *)" (?

[email protected]@@QAEXPAVONScripter@@PAVScriptHandler@@@Z) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 30 error LNK2019: 無法解析的外部符號 "void __cdecl luaL_openlibs(struct lua_State *)" (?luaL_openlibs@@YAXPAUlua_State@@@Z)。該符號在函數 "public: void __thiscall LUAHandler::init(class ONScripter *,class ScriptHandler *)" (?

[email protected]@@QAEXPAVONScripter@@PAVScriptHandler@@@Z) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 31 error LNK2019: 無法解析的外部符號 "void __cdecl luaL_register(struct lua_State *,char const *,struct luaL_Reg const *)" (?luaL_register@@YAXPAUlua_State@@PBDPBUluaL_Reg@@@Z)。該符號在函數 "public: void __thiscall LUAHandler::init(class ONScripter *,class ScriptHandler *)" ([email protected]@@QAEXPAVONScripter@@PAVScriptHandler@@@Z) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter 錯誤 20 error LNK2019: 無法解析的外部符號 "void const * __cdecl lua_topointer(struct lua_State *,int)" (?lua_topointer@@YAPBXPAUlua_State@@[email protected]),該符號在函數 "public: bool __thiscall LUAHandler::isCallbackEnabled(int)" ([email protected]@@[email protected]) 中被引用 C:\Users\luozhuang\Desktop\onscripter-20120416VC\LUAHandler.obj onscripter

解決方法:由於是C++項目。EXE引用的lua頭文件必須這樣寫:

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

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

VC++編譯lua庫 無法解析lua符號問題

相關推薦

VC++編譯lua 無法解析lua符號問題

dsm div number blog reg gist html name dpa VC編譯lua庫 出現錯誤: 錯誤 36 error LNK1120: 21 個無法解析的外部命令 C:\Users\luozhuang\Desktop\onscripter

OpenCv在win下靜態編譯和使用,以及部分無法解析外部符號的錯誤解決

這裡演示的是opencv3.4版本的編譯和使用過程。1、靜態庫編譯CMake進行配置,編譯時我選擇build目錄為build-static。其中需要設定選擇安裝目錄,設定   “CMAKE_INSTALL_PREFIX”  為   /build-static/install 

Qt creator 編譯錯誤:無法解析的外部符號(命令)

log void virtual win idg track deb dia popu 問題來自於:僅僅是在creator 中加入了一個新的DIalog類,並在main(),中實例化並show。就出現例如以下的錯誤: main.obj:-1: error: L

c++連接mysql數據出現無法解析外部符號的問題

vs、解析外部符號include,lib文件夾都已經拷到了項目根目錄,並且設置好了路徑,生成就會出現無法解析的外部符號,提示我無法轉到函數的定義,最後發現vs2017默認win32,但是我的程序集64位的。更改後,重新設置目錄,路徑即可。c++連接mysql數據庫出現無法解析外部符號的問題

QT+VS2008編譯出現errorLNK2001:無法解析的外部符號

若出現如下錯誤: 錯誤 1 error LNK2001: 無法解析的外部符號 "public: virtual struct QMetaObject const * __thiscall Wid

ARToolKit編譯error LNK2019: 無法解析的外部符號 ___glutInitWithExit@12,該符號在函式 _glutInit_ATEXIT_HACK@8 中被引用 解決辦法

1錯誤: 在批量編譯ARToolKit的時候,老是遇到報以下兩個錯誤: 2解決辦法: 在專案工程屬性–》C/C++ –》前處理器 –》前處理器定義 中新增 GLUT_BUILDING_LIB 3原因: OpenGL沒有配置好

error2019無法解析外部符號

“error LNK2019: 無法解析的外部符號 error LNK2001: 無法解析的外部符號“private: static struct _OVERLAPPED CUsbCom::g_WriteOverlapped” 應該是工程設定的問題 沒有連線相應

VS2015無法解析外部符號

在使用VS編輯C++時,遇到了無法解析外部符號的錯誤 嚴重性程式碼說明專案 檔案行 錯誤LNK2019 無法解析的外部符號 "public: __thiscall Employee::Employe

FFmpeg視頻編解碼無法解析的外部符號、找不到inttypes.h文件的問題

detail program targe image types lib 包含 mage 程序 ffmpeg報錯,link2019,無法解析的外部符號。 以下嘗試: 在檢查 包含目錄、庫目錄、鏈接器輸入和系統環境變量 均設置無誤的情況下,包含的文件要寫成以下形式: ex

OpenCV_Viz——OpenCV中Viz的模組編譯無法解析的外部符號BUG

寫在前面 由於實驗室需要,需要重新編譯醫學影象第三方庫全家桶。這裡就需要編譯OpenCV,而編譯後檢視編譯的庫檔案中缺少一個opencv_viz2413d.lib檔案(沒錯,這裡可以看出我使用的OpenCV是opencv-2.4.13.6版本)。所以需要額外重新

C++工程編譯之“error LNK2001: 無法解析的外部符號

今天一整天都在折騰“error LNK2001: 無法解析的外部符號”,就在頭疼不已的時候,總算是找到問題原因了:各個動態連結庫的編譯方式必須統一才行,要不然很容易對庫函式的引用產生衝突。簡單來說就是,如果使用的第三方函式庫編譯方式採用/MD,那麼主工程也應該

libcurl 編譯 無法解析的外部符號

參考連線: 這個時候使用靜態庫會出現無法解析的外部符號,加上下面的幾句話就可以了 #pragma comment(lib, "WS2_32") #pragma comment(lib, "Wldap32.lib") #pragma comment(lib, "Cr

VC++常見錯誤原因解析之error LNK2019: 無法解析的外部符號 "public: void __thiscall

VC++常見錯誤原因解析之error LNK2019: 無法解析的外部符號 "public: void __thiscall 出現這個錯誤,應該首先檢視“#include”語句是否包含,或者是否包含正確。符號無法解析意味著編譯器知道有這個符號存在,也就是有宣告,但在連結時,找不到實現程式碼,

【cuda編譯】error LNK2019: 無法解析的外部符號

vs不認cu檔案,導致無法編譯裡面定義的函式 這是因為建立專案時在配置好cuda環境前添加了cu檔案,此時編譯器不認這些cu檔案。 解決辦法:把所以cu檔案從專案中刪除,配置好專案的cuda環境,再

C++的error LNK2019: 無法解析的外部符號編譯錯誤

1>Proxy.obj : error LNK2019: 無法解析的外部符號 [email protected],該符號在函式 "public: enum ProxyStatus __thiscall CProxy::ConnectProxyServer(u

lmdb編譯過程中出現無法解析的外部符號 NtCreateSection

在為Caffe編譯lmdb.lib的過程中,碰到了下面的問題、 error LNK2019: 無法解析的外部符號 NtClose,該符號在函式 mdb_env_map 中被引用 D:\google-

VTK編譯時出錯,無法解析的外部符號

今天配置VTK,遇到了不少問題好在一一解決了,其中一個是在編譯下面例子時出現的: // VTK-test.cpp : 定義控制檯應用程式的入口點。 // #include <vtkVersion.h> #include <vtkPlaneSource.h

編譯Qt時遇到”error LNK2001: 無法解析的外部符號

解決辦法:執行QT的命令列工具 From a command prompt, change the directory to hello, and typeqmake -project to create a platform-independent project fil