Hello,
I'm working with nRF SDK 14.2 and the NRF52832 Dev kit, developing in C++. I have a base class with a few virtual functions and a derived class that I'm using. The code compiled, linked and flashed fine, but in debugging found that the virtual functions were not working (virtual calls in the base class calling the base implementation rather than the derived implementation).
I tried turning on rtti in the compile, in case this was required to enable virtual functions, but that is producing the following linker error:
undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
Searching I've done suggests the linker needs to be directed to link to C++ runtime ( -lstdc++ ) but this option does not appear to be supported by the SEGGER linker. Linker version info is below.
C:\Program Files\SEGGER\SEGGER Embedded Studio for ARM 4.12\gcc\arm-none-eabi\bin>ld --version
GNU ld (GNU Binutils) 2.30.0.20180329
I'm working with nRF SDK 14.2 and the NRF52832 Dev kit, developing in C++. I have a base class with a few virtual functions and a derived class that I'm using. The code compiled, linked and flashed fine, but in debugging found that the virtual functions were not working (virtual calls in the base class calling the base implementation rather than the derived implementation).
I tried turning on rtti in the compile, in case this was required to enable virtual functions, but that is producing the following linker error:
undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
Searching I've done suggests the linker needs to be directed to link to C++ runtime ( -lstdc++ ) but this option does not appear to be supported by the SEGGER linker. Linker version info is below.
C:\Program Files\SEGGER\SEGGER Embedded Studio for ARM 4.12\gcc\arm-none-eabi\bin>ld --version
GNU ld (GNU Binutils) 2.30.0.20180329
The post was edited 1 time, last by smithron99 ().