Hello. Background: I'm doing uefi, I use c ++ in it in sdk (edk2). This very edk2 does not allow to use the libraries delivered together with the compiler.

Actually the question is: I need to use polymorphism, but when I create a class with a virtual function, I get the error undefined reference to `vtable for cxxabiv1 :: class_type_info '

Does this mean that the virtuality mechanism uses standard libraries, in particular cxxabi, and can this be avoided somehow?

    1 answer 1

    What compiler? Disable ABI and RTTI via command line switches. I think it will help.

    UPD: the -fno-rtti and -fno-exceptions keys finally helped

    • Compiler gcc, so far I could not find the keys to disable, continue to search - valner
    • Thanks for the help, disabling RTTI helped! - valner 2:17 pm
    • Those. Did you use the -fno-rtti switch? - gecube
    • Oh, and also -fno-exceptions just in case. - valner
    • OK. I understood you. - gecube 2:53 pm