草庐IT

something_undefined

全部标签

C++ - 对`vtable 的 undefined reference

我想知道为什么会出现此错误:对“BaseRenderer的vtable”的undefinedreference我尝试四处搜索,但似乎无法弄清楚。我试过摆脱虚函数,删除构造函数等。我的BaseRenderer.hclassBaseRenderer:publicRenderer{Q_OBJECTpublic:BaseRenderer();BaseRenderer(QWidget*parent);voidpaintGL();virtual~BaseRenderer();publicslots:voidloadDialog();signals:protected:MeshloadMesh(st

C++/boost : Undefined Symbols in example?

我正在尝试编译的示例来自:http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/examples.html(聊天示例)这是我用来制作它的:>>>g++chat_client.cppchat_message.hpp>>>g++chat_server.cppchat_message.hpp这是终端输出的内容:%g++chat_client.cppchat_message.hppInfileincludedfromchat_client.cpp:17:chat_message.hpp:Inmemberfunction‘voidcha

c++ - 对 `typeinfo for class' 的 undefined reference 和对 `vtable for class' 的 undefined reference

这个问题在这里已经有了答案:Undefinedsymbols"vtablefor..."and"typeinfofor..."?(5个答案)关闭9年前。我正在处理C++中的继承。我想写一个程序来对两个数组进行加法和减法。这是我的代码:#include#include#includeusingnamespacestd;classroot{protected:intsize;double*array;public:virtual~root(){}virtualroot*add(constroot&)=0;virtualroot*sub(constroot&)=0;virtualistrea

c++ - 对 std::ios_base::Init::Init() 的 undefined reference

我正在使用C++学习OOP,但遇到了问题。我确定这是一个内存分配问题,但似乎无法理解它。任何帮助将不胜感激。我的客户端代码#include#include"Box.cpp"usingnamespacestd;intmain(){Box*box=newBox;return0;}我的盒子类...#includeusingnamespacestd;classBox{private:doublewidth;doubleheight;doubleperimeter;doublearea;public:Box(){coutwidth;}doublegetHeight(){//returnthis-

c++ - 对 vtable 的 undefined reference - 虚拟成员,由 gsoap 生成的类

gsoap及其工具wsdl2h和soapcpp2为我提供了一个包含以下内容的soapStub.h文件:classSOAP_CMACns2__SOAPKunden{public:std::string*adresszusatz;//...public:virtualintsoap_type()const{return7;}//...ns2__SOAPKunden():adresszusatz(NULL),x(NULL){}//leftoutallmemberinit.virtual~ns2__SOAPKunden(){}};我从一个小应用程序开始,使用该类使用来自informixDB的数

c++ - "Undefined reference to"使用 Lua

我收到错误undefinedreferenceto'luaL_newstate'当我尝试构建我的项目时。我知道这是链接器的错误,但我对Lua和向项目添加库还比较陌生。顺便说一下,我使用Code::Blocks。API函数luaL_openlibs,luaL_loadfile,lua_pcall,lua_getfield,lua_type,lua_settop也不见了。我在一个网站上看到我必须将我的项目与libdl链接才能解决这个问题,但我真的不知道这意味着什么以及如何去做。 最佳答案 我遇到了同样的问题,就我而言,我找到了适合我的解

c++ - 链接器错误 - 带有 libboost_thread 的 macOS 上 undefined symbol std::string::c_str() const?

我从homebrew安装了boost1.55.0在macos小牛队上。获取链接器异常-找不到std::string::c_str(),我不明白为什么。这可能是Homebrew软件的问题吗?我尝试直接从boost编译boost1.55.0,它甚至没有在macOS上构建。这段代码:#include#include#include#includetypedefstd::unordered_mapStringMap;staticboost::thread_specific_ptr>rlist;intmain(){return0;}使用此命令行编译:g++-std=c++11main.cpp-I

C++ 链接错误 : Undefined symbols using a templated class

我在编写的类中遇到了一些非常奇怪的链接错误。我完全找不到任何可以描述正在发生的事情的东西。VisualStudio(WindowsXP)players.obj:errorLNK2019:unresolvedexternalsymbol"public:__thiscallTreeNode::TreeNode(void)"(??0?$TreeNode@VPlayer@@@@QAE@XZ)referencedinfunction"public:__thiscallPlayerList::PlayerList(void)"(??0PlayerList@@QAE@XZ)Xcode(OSX10.5

c++ - 为什么这给我 "Undefined references to constructors and destructors"?

我有以下代码:Leomedia.h#include"MusicMetaDatter.h"#ifndefLEOMEDIA_H#defineLEOMEDIA_HnamespaceLeomedia{typedefenum{read,write}FileMode;}#endif//LEOMEDIA_HMusicMetaDatter.h#ifndefMUSICMETADATTER_H#defineMUSICMETADATTER_H#include"Leomedia.h"#include/***METADATTER*@Version1.0.0a*@Author:SergioAndrésIbañez

c++ - 对 'QNetworkAccessManager' 的 undefined reference

我是QTAPI和QTIDE的新手,我正在学习本教程:http://developer.nokia.com/community/wiki/Creating_an_HTTP_network_request_in_Qt,但是当我尝试编译时出现此错误,问题的通常原因是:编译器无法找到方法代码所在的.cpp/.lib存档,但在这种情况下,api已经配置好了,我不明白为什么会出现此错误,而且我找不到项目属性,这是我的测试代码:#include#include#include#include#include这是mainwindow.hpp文件中包含的header,现在是mainwindow.cpp: