Skip to content
Trang chủ » Understanding The Undefined Reference To Vtable Error In C++

Understanding The Undefined Reference To Vtable Error In C++

C++ Virtual Functions VTable Explanation

Undefined Reference To Vtable For

Title: Understanding the “undefined reference to vtable for” Error in C++

Introduction:

C++ is a powerful programming language that supports object-oriented programming paradigms. One of the key features of C++ is the ability to use virtual functions, which enable polymorphism and dynamic binding. However, when using virtual functions, developers may encounter errors such as the “undefined reference to vtable for” error. In this article, we will dive deep into this error, understand its causes, and explore effective solutions to fix it.

What is an “undefined reference to vtable for” error?

The “undefined reference to vtable for” error is a compilation error commonly encountered in C++ programming. It occurs when the linker is unable to find a reference to a virtual function table (vtable) for a particular class. The vtable is a data structure that contains function pointers to the virtual functions of a class.

Virtual functions in C++:

Virtual functions in C++ allow us to define a common interface for a hierarchy of classes. They enable polymorphism by allowing objects of derived classes to be treated as objects of their base class, simplifying code and promoting code reuse. When a virtual function is called, the C++ compiler looks up the correct function implementation based on the actual type of the object at runtime, rather than using the static type.

Understanding the vtable in C++:

In C++, each class that contains at least one virtual function has an associated vtable. The vtable is created by the compiler and contains function pointers to all the virtual functions defined in that class and its base classes. When a program runs and a virtual function is called for an object, the vtable is used to determine the actual address of the appropriate function.

Causes of the “undefined reference to vtable for” error:

1. Missing function definition: If a class declares a virtual function but fails to provide a definition for it, the linker will be unable to find the reference to the vtable, resulting in the error.

2. Non-virtual destructor: All classes with virtual functions should also have a virtual destructor. If a class has a virtual destructor, it ensures proper destruction of objects during the cleanup process, avoiding memory leaks and other issues.

3. Incorrect usage of Q_OBJECT macro: When using the Qt framework, the Q_OBJECT macro must be added to the class declaration for it to support signals and slots. Not including this macro leads to the “undefined reference to vtable” error.

How to fix the “undefined reference to vtable for” error:

1. Provide function definitions: Ensure that all virtual functions declared in a class have appropriate function definitions. This can be done by implementing the virtual functions within the class or its derived classes.

2. Include a virtual destructor: Add a virtual destructor to any class that contains virtual functions. This ensures proper cleanup and avoids issues related to memory leaks.

3. Proper usage of Q_OBJECT macro: If you encounter this error while using the Qt framework, ensure that the Q_OBJECT macro is included in the class declaration that requires signals and slots functionality.

Common mistakes that lead to the “undefined reference to vtable for” error:

1. Mixing up function signatures: Ensure that the signature of the virtual function matches between the declaration in the base class and its overrides in the derived classes. Mismatches in function signatures can lead to the error.

Tips for avoiding the “undefined reference to vtable for” error:

1. Follow good coding practices: Always provide function definitions for declared virtual functions and include a virtual destructor when necessary.

2. Double-check the Q_OBJECT macro: While using the Qt framework, make sure to include the Q_OBJECT macro in the class which requires signals and slots functionality.

FAQs:

Q: What is the “undefined reference to typeinfo for” error?
A: The “undefined reference to typeinfo for” error occurs when the linker is unable to find the reference to type information for a class. It is often related to missing or incorrect virtual function definitions.

Q: What is the “Undefined reference to vtable for shape” error?
A: The “Undefined reference to vtable for shape” error typically occurs when the virtual function table (vtable) for a class named “shape” is not found. This error is commonly caused by missing or incorrect definitions of virtual functions in the “shape” class.

Q: What is the “Q_object undefined reference to vtable” error?
A: The “Q_object undefined reference to vtable” error is encountered when using the Qt framework. It occurs due to missing or incorrect usage of the Q_OBJECT macro, which is required for signal and slot functionality.

Q: Can the “undefined reference to vtable for” error be encountered in C programming?
A: No, the “undefined reference to vtable for” error is specific to C++ programming. In C, virtual functions and vtables are not supported.

Conclusion:

The “undefined reference to vtable for” error is a common issue in C++ programming, often related to missing or incorrect function definitions and the absence of a virtual destructor. By understanding the causes and following the recommended solutions, developers can effectively fix this error and ensure their programs utilize virtual functions and polymorphism seamlessly. Remember to double-check the Q_OBJECT macro when using the Qt framework to avoid related errors.

C++ Virtual Functions Vtable Explanation

What Is Undefined Reference To Vtable For?

What is undefined reference to vtable for?

When working with object-oriented programming languages such as C++, you may encounter a particularly cryptic error message: “undefined reference to vtable for” or some variation thereof. This error message can be quite puzzling, especially for beginners, as it appears to refer to something called a “vtable.” In this article, we will shed light on this error message, explain what it means, why it occurs, and how to resolve it.

Understanding the concept of a vtable:
Before delving into details, it is necessary to comprehend the concept of a vtable. A vtable, short for “virtual function table,” is a data structure used in C++ (and other languages that support polymorphism) to implement runtime polymorphism, which is a fundamental feature of object-oriented programming.

In C++, a virtual function is a member function that is declared within a base class and redefined (or overridden) by derived classes. This allows different derived classes to provide their own implementations of the same function. The vtable is a table of function pointers that stores the addresses of these overridden functions, enabling dynamic dispatch.

In simple terms, when a virtual function is called on a derived class object through a pointer or reference of a base class type, the vtable is consulted to determine which version of the function should be executed based on the actual object type. This dynamic binding at runtime is one of the key features of object-oriented programming languages.

Understanding the “undefined reference to vtable” error:
Now that we’ve established the concept of a vtable, let’s explore why the error message “undefined reference to vtable for” occurs. This error typically arises during the linking phase of the compilation process when the linker is unable to locate the virtual function table for a class or a class that inherits from it.

The linker’s responsibility is to resolve symbols, such as function definitions, to their corresponding addresses. In the case of a vtable, the linker expects to find the definitions of the virtual functions declared within a class. However, if the virtual functions are not defined, either because they are declared but not implemented or due to a mistake in the code structure, the linker cannot find the necessary information and produces the “undefined reference to vtable for” error.

Common causes of the “undefined reference to vtable” error:
Several factors can lead to the occurrence of this error message. Here are some common causes to consider:

1. Missing function definitions: One possible cause is forgetting to define a virtual function in a class that declares it. Make sure that all virtual functions are implemented, providing a valid definition for each of them.

2. Inline function definitions: Defining virtual functions inline within a class declaration can cause issues during linking. It is advisable to define these functions outside the class declaration to avoid potential problems.

3. Incorrect order of function declarations: The order of function declarations matters in C++. Ensure that the virtual function definitions appear before any function that calls or references them.

4. Missing implementation of pure virtual functions: If a base class declares a pure virtual function, any derived class inheriting from it must provide a definition for that function. Failure to do so will result in the “undefined reference to vtable” error.

Resolving the “undefined reference to vtable” error:
To address this error, consider the following troubleshooting steps:

1. Check for missing function definitions: Verify that all virtual functions declared in a class have corresponding definitions. Ensure that the function signatures and return types match exactly between the declaration and the implementation.

2. Move function definitions outside the class declaration: If virtual functions are defined inline within a class declaration, rewrite them outside the class.

3. Reorder function declarations: Ensure that the virtual function definitions appear before any functions that rely on them. Alternatively, you can use forward declarations to declare the presence of the virtual functions early on.

4. Implement pure virtual functions: If a base class declares a pure virtual function, provide definitions for these functions in the derived classes that inherit from it.

FAQs:
Q1. Is the “undefined reference to vtable” error specific to C++?
Yes, this error is specific to C++ and other languages that support runtime polymorphism and vtables as a language construct.

Q2. Can I have multiple vtables in a single class hierarchy?
No, a single vtable exists per class hierarchy. Each class within the hierarchy shares the same vtable structure.

Q3. Does the “undefined reference to vtable” error always imply an issue with virtual functions?
While virtual function-related issues are the most common cause of this error, it is not the only possibility. Other issues, such as incorrect compiler settings or missing object instances, can also result in similar error messages.

Q4. Are vtables used in all object-oriented programming languages?
No, vtables are not used in all object-oriented programming languages. Their implementation may vary between languages, and some languages may use different mechanisms to achieve runtime polymorphism.

In conclusion, the “undefined reference to vtable for” error message in C++ occurs when the linker cannot locate the virtual function table for a class or a class inheriting from it. It commonly arises due to missing function definitions, incorrect order of declarations, and other related issues. By understanding the underlying concepts of vtables, virtual functions, and their interplay, developers can effectively troubleshoot and resolve this error, ensuring the smooth execution of their C++ programs.

What Is Vtable In C++?

What is vtable in C++?

The concept of vtable in C++ is an integral part of understanding how virtual functions work in the language. A vtable, or virtual function table, is a data structure used by the compiler to implement polymorphism and dynamic dispatch for virtual functions.

In C++, virtual functions allow the derived classes to override functions defined in the base class. This is crucial for achieving runtime polymorphism, where an object’s behavior is determined by its actual type rather than its declared type. The vtable plays a vital role in determining which function should be called at runtime.

When a class is defined with virtual functions, the compiler generates a hidden pointer, commonly referred to as the vpointer or vptr, for each object of that class. This pointer points to the vtable associated with that class. The vtable is essentially an array of function pointers, where each pointer represents a virtual function defined in the class.

It’s important to note that each class with at least one virtual function has its own unique vtable, and the size and contents of the vtable are determined at compile-time. In other words, each class with virtual functions has its own set of function pointers stored in the vtable.

How Does a vtable Work?

Consider the following example:

“`cpp
class Shape {
public:
virtual double getArea() { return 0.0; }
};

class Rectangle : public Shape {
public:
double getArea() override { return length * width; }

private:
double length;
double width;
};

class Circle : public Shape {
public:
double getArea() override { return 3.14 * radius * radius; }

private:
double radius;
};
“`

In this example, the base class `Shape` defines a virtual function `getArea()`, which is later overridden by the derived classes `Rectangle` and `Circle`. The vtable for `Shape` will include a single function pointer to the implementation of `getArea()`.

When an object of type `Rectangle` or `Circle` is created, it contains a hidden pointer (vptr) that points to the corresponding vtable for `Shape`. This vptr is set by the C++ runtime during object construction.

During runtime, when a virtual function is called using a pointer or reference to a base class, the vptr is used to access the correct vtable. The vtable, in turn, is used to determine the appropriate dynamic binding.

For example:

“`cpp
Shape* shape = new Rectangle();
double area = shape->getArea(); // Calls Rectangle’s getArea() via vtable
“`

In the above code snippet, the `getArea()` function of the `Rectangle` class is called even though the declared type of `shape` is `Shape*`. This is made possible by the vtable mechanism, which dynamically resolves the appropriate function based on the actual type of the object at runtime.

Why is the vtable Needed?

The vtable plays a crucial role in achieving polymorphism and dynamic dispatch in C++. Without a vtable, calling a virtual function of a derived class through a base class pointer or reference would always invoke the base class function, irrespective of the actual type of the object. This would defeat the purpose of polymorphism, as the behavior of objects would be limited by their declared type.

By using a vtable, C++ enables objects to exhibit behavior specific to their actual types. The vtable mechanism allows for late binding, where the appropriate function to be called is determined dynamically at runtime.

FAQs:

Q: Can a class have multiple vtables?
A: No, each class with virtual functions has only one vtable associated with it.

Q: Is the vtable the same as the virtual function table?
A: Yes, both terms refer to the same concept.

Q: When is the vtable created?
A: The vtable is created at compile-time. Each class with virtual functions has its own vtable.

Q: Can a vtable be modified at runtime?
A: No, the contents of the vtable are determined at compile-time and remain static.

Q: What happens if a derived class does not override a virtual function?
A: The derived class inherits the base class’s virtual function and uses it as is.

Q: How is function overriding different from function overloading?
A: Function overriding occurs when a derived class provides its own implementation of a virtual function, while function overloading involves defining multiple functions with the same name but different parameters.

In conclusion, the vtable is a fundamental mechanism in C++ that enables polymorphism and dynamic dispatch for virtual functions. It allows objects to exhibit behavior specific to their actual types, rather than being limited by their declared types. The vtable, along with the vptr, ensures that the appropriate function is called at runtime, facilitating late binding and achieving runtime polymorphism.

Keywords searched by users: undefined reference to vtable for Undefined reference to typeinfo for, Undefined reference to vtable for shape, Q_object undefined reference to vtable, Undefined reference to in C, Undefined reference to main, Undefined reference to destructor, Undefined reference to initwindow, Undefined reference to class C++

Categories: Top 44 Undefined Reference To Vtable For

See more here: nhanvietluanvan.com

Undefined Reference To Typeinfo For

Undefined reference to typeinfo is an error that occurs in C++ programming when there is a missing definition for a class or function involving type information. This error typically arises when using polymorphism, specifically the dynamic_cast and typeid operators. It can be quite frustrating for programmers, especially those new to the language. In this article, we will dive deeper into the undefined reference to typeinfo error, explore its causes, discuss potential solutions, and provide some frequently asked questions to assist you in resolving this issue.

Causes of Undefined Reference to Typeinfo Error:
1. Missing Definitions: One common cause of this error is when a class or function lacks a corresponding implementation. This can happen if the declaration is included in a header file, but the definition is missing from the source file. Make sure that all necessary definitions are provided for the types involved in dynamic_cast or typeid operations.

2. Incomplete or Incorrect Linking: Another possibility is that the required object files or libraries are not properly linked during the compilation process. Ensure that all necessary dependencies are correctly included in the build process. This error can occur if there is a mismatch between the objects being linked or if the required libraries are not being linked at all.

3. Compiler Configuration: Sometimes, the issue can be attributed to incorrect compiler configuration settings. Verify that the appropriate flags or options required for C++ type information support are enabled, as some compiler settings may disable RTTI (Run-Time Type Information) by default.

4. Separate Compilation Units: When using separate compilation units, such as multiple source files and header files, the order of compilation might affect the availability of type information. Ensure that all relevant files are compiled and linked in the correct sequence to prevent this error.

Solutions to Resolve Undefined Reference to Typeinfo Error:
1. Check Definitions: Review your source code and confirm that all classes and functions involved in type information operations have the necessary definitions. Ensure that the corresponding source files are correctly included in the build process. Pay attention to any missing or misspelled function names or incorrect class declarations.

2. Verify Linking: Double-check the linking process and make sure that the required object files and libraries are properly included. Ensure that you are linking with the correct version of the libraries, and consider checking for any additional dependencies that might be required.

3. Compiler Flags: Look into your compiler documentation to determine the appropriate flags or options needed to enable RTTI support. For example, with GCC, you can enable RTTI by adding the -frtti flag during the compilation process. Note that enabling RTTI may have some performance implications, so be mindful of the trade-offs.

4. Reorder Compilation: If you’re using separate compilation units, try changing the order of compilation to ensure that the necessary type information is available when required. Sometimes, compiling the source files in a different sequence may resolve the error.

Frequently Asked Questions (FAQs):

Q1: Why am I getting an “undefined reference to typeinfo” error?
A1: This error occurs when the definition for a class or function involving type information is missing. It could be due to a missing implementation, incorrect linking, or disabled RTTI settings.

Q2: What is RTTI (Run-Time Type Information)?
A2: RTTI is a mechanism in C++ that allows the identification of an object’s type during runtime. It is essential for operations like dynamic_cast and typeid.

Q3: How can I enable RTTI support in my compiler?
A3: The process varies depending on the compiler you are using. Consult your compiler documentation to find the appropriate flags or options required to enable RTTI. For example, with GCC, you can use the -frtti flag during compilation.

Q4: Does enabling RTTI have any performance implications?
A4: Enabling RTTI may lead to a slight decrease in performance due to additional memory overhead and runtime checks. However, the impact is generally negligible for most applications.

Q5: I have verified all definitions and linking, but the error persists. What should I do?
A5: In such cases, it’s worth examining any third-party libraries you’re using. Ensure that they are properly linked and compatible with your compiler settings. Additionally, seek assistance from online forums or communities where experienced programmers may have encountered similar issues.

In conclusion, the “undefined reference to typeinfo” error in C++ can be quite frustrating, but by following the steps outlined above and double-checking your code, definitions, and linking process, you can effectively resolve it. Remember to consult the documentation of your compiler and any third-party libraries you are using. With persistence and attention to detail, you can overcome this error and continue programming with confidence.

Undefined Reference To Vtable For Shape

Undefined reference to vtable for shape is a common error encountered by C++ programmers. This error occurs when a program attempts to use a virtual function from an object of a derived class, but the virtual function is not defined in the derived class. In this article, we will delve into the details of this error, understanding its causes, and exploring the steps to resolve it. We will also address some frequently asked questions related to this error.

Understanding the error “undefined reference to vtable for shape”
—————————————————————–

In C++, a vtable (virtual function table) is used to implement polymorphism. It is an array of function pointers that point to the virtual functions defined in a class. When a base class has a virtual function and a derived class overrides it, the derived class objects contain a pointer to the vtable of the derived class. This allows the program to invoke the appropriate virtual function at runtime when dealing with objects of the derived class.

However, an “undefined reference to vtable for shape” error occurs when the virtual function in the derived class is not properly defined. This can happen due to various reasons, such as misspelling the function name, not properly qualifying the function with the class name, or failing to provide a definition for the virtual function altogether.

Resolving the “undefined reference to vtable for shape” error
————————————————————

To resolve this error, you need to go through the following steps:

1. Ensure that the virtual function is correctly declared in both the base and derived class. The virtual function in the derived class must have the same signature (return type and parameters) as the one in the base class.

2. Provide a proper definition for the virtual function in the derived class. It is essential to implement the virtual function in the derived class, even if it’s just an empty body. Failing to provide a definition for the virtual function will result in the error “undefined reference to vtable for shape”.

3. Check for any misspellings or typographical errors in the function name. A simple mistake like misspelling the virtual function’s name in the derived class can lead to the “undefined reference to vtable for shape” error.

4. Make sure that the virtual function is being called correctly in your code. Ensure that the object calling the virtual function is of the derived class type, and that the pointer or reference to the derived class is used appropriately.

Frequently Asked Questions
————————–

Q: Why am I getting the “undefined reference to vtable for shape” error?
A: This error occurs when a virtual function in a derived class is not properly defined, misspelled, or lacks a definition altogether.

Q: Can I have a virtual function with a different signature in the derived class?
A: No, the virtual function in the derived class must have the same signature as the one in the base class. Otherwise, the compiler will consider it as a separate function instead of overriding the base class’s virtual function.

Q: I have defined the virtual function in the derived class, but I am still encountering the error. What could be the problem?
A: Ensure that the derived class is being properly instantiated, and that you are using the correct syntax to call the virtual function in your code. Double-check for any misspellings or typographical errors.

Q: Are there any best practices to avoid encountering this error?
A: It is good practice to always provide a proper definition for the virtual function in the derived class, even if it is just an empty body. Additionally, consistently use the correct naming conventions and thoroughly test your code to catch any potential errors early on.

Conclusion
———-

The “undefined reference to vtable for shape” error in C++ can be frustrating, but it is usually straightforward to solve. By ensuring that the virtual function is correctly defined and implemented in the derived class, checking for misspellings or typographical errors, and using the correct syntax to call the virtual function, you can successfully resolve this error. Remember to adhere to best practices and carefully test your code to avoid encountering this error in the first place.

Q_Object Undefined Reference To Vtable

Q_object undefined reference to vtable: Understanding the Issue and How to Resolve It

The “Q_object undefined reference to vtable” error is a common issue encountered by developers using the Qt framework in C++. This error typically occurs when the Q_OBJECT macro is not declared properly or when the build system is not set up correctly. In this article, we will dive deep into the root cause of this issue, explore various scenarios where it may arise, and discuss potential solutions. Additionally, we will provide answers to frequently asked questions related to this error.

Understanding the Q_OBJECT Macro and Its Importance:

Qt, a popular framework for C++, provides numerous features and functionalities that facilitate rapid and efficient software development. One of the key elements in Qt programming is the use of the Q_OBJECT macro. This macro is typically added to the class declaration file and informs the Qt’s meta-object system about the presence of signals and slots in the class.

The Q_OBJECT macro triggers the generation of the meta-object code necessary for the Qt framework features like signals, slots, and introspection. This code is usually generated by the MOC (Meta-Object Compiler) – a pre-processor provided by the Qt framework.

Root Causes of the “Q_object undefined reference to vtable” Error:

1. Missing or Misplaced Q_OBJECT Macro:
The most common cause of this error is forgetting to declare the Q_OBJECT macro or placing it incorrectly within the class declaration. Ensure that the macro is placed inside the private section of the class.

2. Build System Configuration:
If the build system is not set up correctly, it may fail to process the MOC-generated code, resulting in the error. This can be resolved by ensuring proper configuration of the build system to include the MOC-generated files during the build process.

3. Inaccessible or Incorrectly Defined Classes:
If a class is experiencing the “Q_object undefined reference to vtable” error, it may be due to the class being inaccessible or having incorrect or incomplete definitions.

Resolving the “Q_object undefined reference to vtable” Error:

Now that we have a better understanding of the root causes, let’s explore the potential solutions to resolve the error.

1. Declare and Place the Q_OBJECT Macro Correctly:
Ensure that the Q_OBJECT macro is declared within the private section of the class declaration file, usually in the header file (.h). Check for any missing or incorrectly placed macros and address them accordingly.

2. Rebuild the Project:
Sometimes, the error may arise due to the build system not recognizing the changes made to the class files. In such cases, rebuilding the project can often fix the issue. Deleting any stale build artifacts and performing a clean build can help ensure that the latest changes are incorporated.

3. Check Build System Configuration:
Verify that the build system is correctly configured to include the MOC-generated files during the build process. Ensure that the necessary dependencies and include paths are set up appropriately.

4. Review Class Accessibility and Definitions:
If the error persists, review the accessibility and definitions of the classes involved. Ensure the classes are accessible, correctly defined, and not incomplete or outdated.

Frequently Asked Questions (FAQs):

Q1: Why am I getting the “Q_object undefined reference to vtable” error?
A1: The error occurs when the Q_OBJECT macro is missing or misplaced within the class declaration or when the build system configuration is incorrect.

Q2: How can I fix the “Q_object undefined reference to vtable” error?
A2: To resolve the error, double-check the placement and declaration of the Q_OBJECT macro, rebuild the project, review the build system configuration, and ensure proper class accessibility and definitions.

Q3: Does this error only occur in Qt projects?
A3: Yes, this error is specific to projects that use the Qt framework, as it relies on the Q_OBJECT macro and the Qt’s meta-object system.

Q4: Can I have multiple Q_OBJECT macros within a class?
A4: No, a class should have only one Q_OBJECT macro. Having multiple Q_OBJECT macros within a class will result in compilation errors.

In conclusion, the “Q_object undefined reference to vtable” error is a common issue faced by developers using the Qt framework. By properly declaring and placing the Q_OBJECT macro, reviewing the build system configuration, and ensuring correct class accessibility and definitions, developers can resolve this error and experience smooth Qt development.

Images related to the topic undefined reference to vtable for

C++ Virtual Functions VTable Explanation
C++ Virtual Functions VTable Explanation

Found 49 images related to undefined reference to vtable for theme

C++ - Qt Undefined Reference To Vtable - Stack Overflow
C++ – Qt Undefined Reference To Vtable – Stack Overflow
C++ : Qt Linker Error:
C++ : Qt Linker Error: “Undefined Reference To Vtable” – Youtube
C++ - Seeing Undefined Reference To `Vtable For Collidingmice' - Stack  Overflow
C++ – Seeing Undefined Reference To `Vtable For Collidingmice’ – Stack Overflow
C++ : Undefined Reference To `Typeinfo For Class' And Undefined Reference  To `Vtable For Class' - Youtube
C++ : Undefined Reference To `Typeinfo For Class’ And Undefined Reference To `Vtable For Class’ – Youtube
Undefined Reference To 'Vtable For...'
Undefined Reference To ‘Vtable For…’
C++ Undefined Reference: A Linker Error That May Come Up In C++
C++ Undefined Reference: A Linker Error That May Come Up In C++
Solved]-Undefined Reference To `__Imp_Wsacleanup'-C++
Solved]-Undefined Reference To `__Imp_Wsacleanup’-C++
C++ - Undefined Reference To Functions Using Multiple Files - Stack Overflow
C++ – Undefined Reference To Functions Using Multiple Files – Stack Overflow
C Compilation Error: Undefined Reference To - Youtube
C Compilation Error: Undefined Reference To – Youtube
Solved]-Undefined Reference To 'Sdl_Main'-C++
Solved]-Undefined Reference To ‘Sdl_Main’-C++
Virtual Function In C++ Pure Virtual Function
Virtual Function In C++ Pure Virtual Function
Fix Error: Undefined Reference To Winmain | Collect2.Exe: Error: Ld  Returned 1 Exit Status | C/C++ - Youtube
Fix Error: Undefined Reference To Winmain | Collect2.Exe: Error: Ld Returned 1 Exit Status | C/C++ – Youtube

Article link: undefined reference to vtable for.

Learn more about the topic undefined reference to vtable for.

See more: https://nhanvietluanvan.com/luat-hoc

Leave a Reply

Your email address will not be published. Required fields are marked *