草庐IT

missing-symbols

全部标签

c++ - poco c++ 静态链接问题与 undefined symbol 引用

我正在尝试像这样链接到POCOC++库的静态版本:g++BCCMain.o-L$_POCO_LIBS-Wl,-Bstatic$_POCO_LIBS/libPocoFoundation.a$_POCO_LIBS/libPocoUtil.a$_POCO_LIBS/libPocoXML.a$_POCO_LIBS/libPocoJSON.a-Wl,-Bdynamic-oBCMain不幸的是,这会导致一些undefinedsymbol引用错误,例如:Poco::Logger::get(std::basic_string,std::allocator>const&)即使Poco::Logger::

c++ - Visual C++ 2010 - fatal error LNK1169 : one or more multiply defined symbols found

这是一个程序:#includeusingnamespacestd;intmain(){cout>i;try{if(i==0)throw0;if(i==2)throw"error";}catch(inti){cout在编译时(Windows7上的MicrosoftvisualC++2010express),我收到错误消息:fatalerrorLNK1169:oneormoremultiplydefinedsymbolsfound 最佳答案 其实这段代码没有错误。源文件的数量可能是问题所在。在同一个编译器中将此代码作为一个新项目尝试,或

c++ - 为什么我得到 "Undefined symbols ... typeinfo ... vtable"与虚拟和具体类?

我正在重新学习C++(意思是:对我温柔一点!:)。我有一个父类(superclass)(Node),它有一个必须在子类(TestNode)中实现的抽象方法(step())。它编译没有错误,也没有任何警告,但链接它会导致:bash-3.2$g++-Wall-o./bin/t1src/t1.cppUndefinedsymbolsforarchitecturex86_64:"typeinfofortest::Node",referencedfrom:typeinfofortest::TestNodeint1-9f6e93.o"vtablefortest::Node",referencedfr

c++ - "missing type specifier"构造函数声明错误

我在2个不同的文件中有2个类:正则矩阵.h:#ifndef_RM_H#define_RM_H#include"SparseMatrix.h"...classRegMatrix{...RegMatrix(constSparseMatrix&s){...}//ctor...};#endif稀疏矩阵.h:#ifndef_SM_H#define_SM_H#include"RegMatrix.h"...classSparseMatrix{...SparseMatrix(constRegMatrix&r){...}//ctor...};#endif在构造函数行上我得到了错误:错误C4430:缺少类

c++ - Clrdump (C++) 错误 LNK2019 : unresolved external symbol __imp__RegisterFilter@8 referenced in function _main

我正在使用带有pvcs编译器的makefile系统(使用MicrosoftVisualC++,2008编译器),我收到了几个以下形式的链接错误:errorLNK2019:unresolvedexternalsymbol__imp__RegisterFilter@8referencedinfunction_main尽管使用了extern"C"声明,但还是会发生这种情况,即:extern"C"intCLRDUMP_APIRegisterFilter(LPCWSTRpDumpFileName,unsignedlongDumpType);此外,在makeexe.mak中,库链接如下:$(编译库

c++ - 体系结构 x86_64 的 G++ undefined symbol

我正在学习C++,并接到了创建Vector3D类的作业。当我尝试在OSX上使用G++编译main.cpp时,出现以下错误消息。为什么会这样?g++main.cppUndefinedsymbolsforarchitecturex86_64:"Vector3DStack::Vector3DStack(double,double,double)",referencedfrom:_mainincc9dsPbh.old:symbol(s)notfoundforarchitecturex86_64main.cpp#include;#include"Vector3DStack.h";usingnam

c++ - 在 macOS High Sierra 上使用 node-gyp 动态链接 wfdb 库时未加载符号

我正在尝试创建一个依赖于WFDB库(https://www.physionet.org/physiotools/wfdb.shtml)的动态库。我的C++代码如下所示:#include#include#include#includeextern"C"{#include}#include"./sample_wfdb.h"intadd(inta,intb){returna+b;}intread(){inti,nsig;WFDB_Siginfo*siarray;WFDB_Sample*v;nsig=isigopen("/data/100s",NULL,0);if(nsigsignal1,si

c++ - Lua:C++ 模块不能互相引用, undefined symbol

我创建了两个模块(共享对象)CPU和SaveState作为模拟器的一部分。两者都独立编译成.so单独的文件,并在运行时由Lua脚本使用require()加载;即:SaveState=require("SaveState")CPU=require("CPU")在CPU中,有一个对SaveState进行操作的方法:intCPU::save_state(SaveState*state){state->begin_section(savestate_namespace,savestate_data_size);state->write16(this->reg.af);state->write1

c++ - 重复符号链接(symbolic link)器错误(C++ 帮助)

我现在正在学习一些CSP(约束满足)理论,并且正在使用this解析XML文件的库。我将Xcode用作IDE。我的程序编译正常,但当它链接文件时,我收到XMLParser_libxml2.hh文件的重复符号错误。我的文件是这样分开的:包含上述XMLParser文件的类头文件包含类头文件的类实现文件包含类头文件的主文件重复符号出现在main.o和classfile.o中,但据我所知,我实际上并没有两次添加该.hh文件。完整错误:ld:duplicatesymbolboolCSPXMLParser::UTF8String::to,std::allocator>>(std::basic_str

python - 关于boost-python : dyld: Symbol not found: _PyBaseObject_Type

当我运行我的代码时,我遇到了一个关于boost-python的问题。就像这样:dyld:Symbolnotfound:_PyBaseObject_TypeReferencedfrom:/opt/local/lib/libboost_python-mt.dylibExpectedin:flatnamespace我的项目几个月前就可以正常运行了。但是现在,当我重新配置环境时,它无法运行。-几个月前,我用homebrew配置环境,就像这样:brewinstallboostbrewinstallpythonbrewinstallboost-pythonbrewinstallopencv(Myp