提问人:gladys0313 提问时间:11/18/2015 更新时间:11/18/2015 访问量:292
C++ 未解析的外部符号:找不到引用符号的函数
c++ unresolved external symbols: cannot find the function where the symbol is referenced
问:
我正在编写 c++ 代码。编译时(win7系统,使用build.bat在cmd中编译)出现如下错误:
handler.lib(Media.obj):error LNK2019: unresolved external symbol _lua_pcallk referenced in
function "public:void __thiscall Media::loadScript(struct luabridge::lua_State *,class
std::basic_string<char, struct std::char_traits<char>, class std::allocator<char> > const &)".....
因此,我试图找到该函数
public:void __thiscall Media::loadScript(....)
看看发生了什么,但我在我的工作场所找不到这个功能......关于为什么我找不到这个函数以及为什么会发生这个错误,我有以下想法(为了更清楚起见,整个系统包含11730个文件,这些文件非常复杂):
“public:void __thiscall”后面的东西是一个变量或类似于变量的东西,在代码中的某个地方,这个变量已经被更改了。所以这就是为什么我找不到确切的功能。
有很多代码包含 main 函数,我需要在 main 函数中注册一些必要的 lua 环境。可能我选错了入口主函数?
这些只是我的想法,它们合理吗,还有其他想法吗?哦,在这项工作中,我们使用 LuaBridge 来做 C++ Lua 交互,之前做过类似工作的人遇到过同样的问题吗?
答: 暂无答案
评论
void loadScript (...)
Media
__thiscall
_lua_pcallk
handler.lib