All Questions
16 questions
0
votes
0
answers
28
views
conflicting C++ classes in different modules get mixed up without link error [duplicate]
While working on embedded code (ESP32 with IDF 4.4.3, gcc 8.4) I encountered strange crashes that did not make sense at all. After spending half a day (without debugger) I discovered, that I had two ...
0
votes
1
answer
94
views
Does the vtable persist among binaries if using a non-common class?
Say I have three libraries, all written in C++:
logging.a: a static library to assist with logging. It defines an abstract class that other classes can use to customize their logging (by implementing ...
2
votes
1
answer
73
views
Concatenate symbols from multiple object files into a table (e.g. vtable) at link-time
It might not be possible, but I would like to do something similar to building a vtable at link-time. That is, first I want to emit various function symbols independently, in separate object files. ...
1
vote
1
answer
1k
views
GCC ARM : vtable not initialized
I'm using arm-none-eabi-g++ to compile for an ARM Cortex M microcontroller. My code statically instantiates some modules, initialize them, and execute them sequentially in a loop. Each module (...
0
votes
1
answer
124
views
returning static member for virtual function, missing vtable for abstract class
Newcomer in cpp here, be advised, possibly dumbness ahead.
I was trying to return a static property when implementing a virtual function. This issue a linker error saying that the function wasn't ...
0
votes
1
answer
138
views
Missing v-table. What is the cause?
I can't seem to see why I am getting the following error:
Undefined symbols for architecture x86_64:
"vtable for Mesh_Box_Line", referenced from:
Mesh_Box_Line::Mesh_Box_Line() in playground.o
...
0
votes
0
answers
776
views
Undefined reference to vtable in class with virtual method
I am writing a ROS program and compiling/linking with catkin_make. In a header file, I have defined a class with a virtual method. I then create two sub-classes and implement the virtual method.
...
5
votes
2
answers
6k
views
What could be the cause for runtime "can't find linker symbol for virtual table..." error in Qt?
This question was asked in similar ways multiple times, for example at stackoverflow or forum.qt.io or qtcentre.org. The problem is that this error message is so vague that one solution cannot be ...
-3
votes
1
answer
1k
views
Despite no Virtual Functions, Undefined reference to Vtable
I have a base class and a derived class, angelic_wing(the derived one), and angelic_event(the base one). When I compile, I get the following two errors:
/tmp/ccG6KlZF.o: In function `angelic_wing::...
11
votes
1
answer
2k
views
C++ virtual functions: Can the linker remove entries in the virtual function table which aren't called?
This question is a kind of followup to eliminate unused virtual functions, which does not go deep enough for my interest.
The problem: When defining classes that have virtual functions, the compiler ...
0
votes
0
answers
479
views
Missing Vtable when linking .o files
I am writing a simple server program using ICE by ZeroC. When I try to link the .o files it gave me the following error message:
$ c++ -o server UserMap.o Server.o -L/Library/Developer/Ice-3.5.0/lib -...
1
vote
2
answers
183
views
Impossible linker error
I have a library, libfoo which is made of the following files:
base.hpp
#ifndef BASE_HPP
#define BASE_HPP
class base
{
public:
virtual ~base();
virtual void foo() = 0;
};
...
1
vote
2
answers
759
views
Linker complains about undefined reference on vtable
I have this code in my fileType.h.
class FileType{
private:
School* m_school;
string m_fileFormat;
const string m_cfgFile;
const string m_inputFile;
public:
...
39
votes
8
answers
124k
views
Undefined reference to 'vtable for xxx'
takeaway.o: In function `takeaway':
project:145: undefined reference to `vtable for takeaway'
project:145: undefined reference to `vtable for takeaway'
takeaway.o: In function `~takeaway':
project:151:...
5
votes
1
answer
2k
views
Debugging vtable Linker Errors in GCC
Now and then when using GCC I get cryptic errors like this:
undefined reference to 'vtable for classname'
When it's not caused by a missing library, this not-very-descriptive error message always ...