Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
p.g.'s user avatar
  • 325
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 ...
user2891462's user avatar
  • 3,343
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. ...
Luís Marques's user avatar
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 (...
Foaly's user avatar
  • 93
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 ...
GBF_Gabriel's user avatar
  • 2,666
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 ...
Jon Plotner's user avatar
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. ...
errolflynn's user avatar
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 ...
FrozenTarzan's user avatar
-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::...
Druid's user avatar
  • 133
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 ...
sh-'s user avatar
  • 1,031
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 -...
Tengyu Liu's user avatar
  • 1,253
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; }; ...
ereOn's user avatar
  • 55.9k
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: ...
Moto's user avatar
  • 11
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:...
TacticalMin's user avatar
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 ...
Jason Champion's user avatar

15 30 50 per page