草庐IT

undefine

全部标签

c++ - undefined reference 和非虚拟 thunk

这个问题不太可能帮助任何future的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况相关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visitthehelpcenter.关闭9年前。我有这样的类(class):classProduct{public:virtualdoublegetPrice();virtualvoidsetPrice(doubleprice);};classMusicProduct{protected:stringauthor;doubleprice;public:virtualstringgetAuthor();v

c++ - 对 B::B & B::~B 的 undefined reference

我不断收到g++编译器的投诉,说下面的代码有问题。仔细检查后,我还是想不通为什么从embedMain.cpp中找不到B类的构造函数和析构函数。谁能给我一点提示?谢谢//embedMain.cpp#include"embed.h"intmain(void){Bb("helloworld");return0;},//embed.h#ifndefEMBED_H#defineEMBED_H#includeclassB{public:B(conststd::string&_name);~B();private:std::stringname;};#endif,//embed.cpp#includ

C++ 单例 undefined reference

我是C++的新手,正在尝试理解C++中的单例模式。myclass.h#ifndefMYCLASS_H#defineMYCLASS_HclassMyclass{public:staticMyclass*getInstance();private:Myclass(){}Myclass(Myclassconst&){}Myclass&operator=(Myclassconst&){}staticMyclass*m_instance;};#endif//MYCLASS_Hmyclass.cpp#include"myclass.h"Myclass*Myclass::getInstance(){

C++:使用 "Undefined symbols for architecture x86_64"时出现 "std"错误

我是一名新的C++程序员,我正在尝试运行一个简单的我已经创建了一个文件“test.cpp”,我正在使用gcc在命令行上对其进行编译。命令是“gcctest.cpp-otest”。然后我运行“./test”。(是的,这个过程听起来很基本。)文件如下:#includeintmain(){printf("HelloWorld!");std::cout当我包含包含std的行时,gcc返回以下长错误:Undefinedsymbolsforarchitecturex86_64:"std::__1::locale::use_facet(std::__1::locale::id&)const",ref

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++ - 为什么我得到 "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

Vitis HLS出现undefined reference to的可能解决办法

问题描述:undefinedreferenceto`cv::namedWindow(std::__cxx11::basic_string,std::allocator>const&,int)'undefinedreferenceto`cv::resizeWindow(std::__cxx11::basic_string,std::allocator>const&,int,int)'undefinedreferenceto`cv::imshow(std::__cxx11::basic_string,std::allocator>const&,cv::_InputArrayconst&)'unde

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++ 对 WinMain@16 的 undefined reference (Code::Blocks)

我正在使用Code::Blocks学习C++,每次我尝试创建一个新类时,我都会收到一条错误消息:undefinedreferenceto`WinMain@16'这是我一直在使用的代码:主类#include"Lime.h"#includeusingnamespacestd;intmain(){Limelime;return0;}青柠类(.ccp):#include"Lime.h"#includeusingnamespacestd;Lime::Lime(){cout石灰header(.h):#ifndefLIME_H#defineLIME_HclassLime{public:Lime();

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