<tfoot id='JwH6F'></tfoot>

    <legend id='JwH6F'><style id='JwH6F'><dir id='JwH6F'><q id='JwH6F'></q></dir></style></legend>
  • <small id='JwH6F'></small><noframes id='JwH6F'>

      <i id='JwH6F'><tr id='JwH6F'><dt id='JwH6F'><q id='JwH6F'><span id='JwH6F'><b id='JwH6F'><form id='JwH6F'><ins id='JwH6F'></ins><ul id='JwH6F'></ul><sub id='JwH6F'></sub></form><legend id='JwH6F'></legend><bdo id='JwH6F'><pre id='JwH6F'><center id='JwH6F'></center></pre></bdo></b><th id='JwH6F'></th></span></q></dt></tr></i><div id='JwH6F'><tfoot id='JwH6F'></tfoot><dl id='JwH6F'><fieldset id='JwH6F'></fieldset></dl></div>

        <bdo id='JwH6F'></bdo><ul id='JwH6F'></ul>

        “未定义的引用"使用 Lua

        quot;Undefined reference toquot; using Lua(“未定义的引用使用 Lua)

              <tbody id='7nz0C'></tbody>

                  <bdo id='7nz0C'></bdo><ul id='7nz0C'></ul>
                • <tfoot id='7nz0C'></tfoot>

                  <small id='7nz0C'></small><noframes id='7nz0C'>

                • <i id='7nz0C'><tr id='7nz0C'><dt id='7nz0C'><q id='7nz0C'><span id='7nz0C'><b id='7nz0C'><form id='7nz0C'><ins id='7nz0C'></ins><ul id='7nz0C'></ul><sub id='7nz0C'></sub></form><legend id='7nz0C'></legend><bdo id='7nz0C'><pre id='7nz0C'><center id='7nz0C'></center></pre></bdo></b><th id='7nz0C'></th></span></q></dt></tr></i><div id='7nz0C'><tfoot id='7nz0C'></tfoot><dl id='7nz0C'><fieldset id='7nz0C'></fieldset></dl></div>

                  <legend id='7nz0C'><style id='7nz0C'><dir id='7nz0C'><q id='7nz0C'></q></dir></style></legend>
                  本文介绍了“未定义的引用"使用 Lua的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在尝试构建我的项目时收到错误 undefined reference to 'luaL_newstate'.我知道这是链接器的错误,但我对 Lua 比较陌生,并向项目添加了一个库.顺便说一下,我使用 Code::Blocks.API函数luaL_openlibsluaL_loadfilelua_pcalllua_getfieldlua_typelua_settop 也不见了.

                  I got the error undefined reference to 'luaL_newstate' when I try to build my project. I know it's an error with the linker but I'm relatively new to Lua and adding a library to a project. I use Code::Blocks by the way. API functions luaL_openlibs, luaL_loadfile, lua_pcall, lua_getfield, lua_type, lua_settop are missing too.

                  我在一个网站上看到我必须将我的项目与 libdl 链接才能解决这个问题,但我真的不知道这是什么意思以及如何去做.

                  I saw on a webite that I have to link my project with libdl in order to solve this problem, but I don't really know what it mean and how to do it.

                  推荐答案

                  我遇到了同样的问题,就我而言,我找到了一个对我有用的解决方案 此处.基本上包括将 lua 的 #include 包裹在 extern "C" 中,例如:

                  I faced the same problem, in my case I found a solution that worked for me here. Basically consist in wrapping the #include s of lua inside a extern "C", like:

                  extern "C"{
                      #include <lua5.2/lualib.h>
                      #include <lua5.2/lauxlib.h>
                      #include <lua5.2/lua.h>
                  }
                  

                  这篇关于“未定义的引用"使用 Lua的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)
                  Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)
                  STL BigInt class implementation(STL BigInt 类实现)
                  Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)
                  Move list element to the end in STL(在 STL 中将列表元素移动到末尾)
                  Why is overloading operatoramp;() prohibited for classes stored in STL containers?(为什么禁止对存储在 STL 容器中的类重载 operatoramp;()?)
                    <legend id='hxrKa'><style id='hxrKa'><dir id='hxrKa'><q id='hxrKa'></q></dir></style></legend>

                    <small id='hxrKa'></small><noframes id='hxrKa'>

                      <bdo id='hxrKa'></bdo><ul id='hxrKa'></ul>

                          1. <tfoot id='hxrKa'></tfoot>
                              <tbody id='hxrKa'></tbody>
                            <i id='hxrKa'><tr id='hxrKa'><dt id='hxrKa'><q id='hxrKa'><span id='hxrKa'><b id='hxrKa'><form id='hxrKa'><ins id='hxrKa'></ins><ul id='hxrKa'></ul><sub id='hxrKa'></sub></form><legend id='hxrKa'></legend><bdo id='hxrKa'><pre id='hxrKa'><center id='hxrKa'></center></pre></bdo></b><th id='hxrKa'></th></span></q></dt></tr></i><div id='hxrKa'><tfoot id='hxrKa'></tfoot><dl id='hxrKa'><fieldset id='hxrKa'></fieldset></dl></div>