cancel
Showing results for 
Search instead for 
Did you mean: 

Using TouchGFX with RTTI (run-time type information) enabled creates lot of "undefined reference to `typeinfo for touchgfx::.." linker erros.

t.decker
Senior II

I'm working on a STM32F7 software project with TouchGFX, FreeRTOS, lwIP and more. Now I'm playing with the "cereal" library for serialization which needs the RTTI option enabled. So I unchecked the -fno_rtti option in the compiler/linker options.

0693W00000NqBthQAF.png 

But this gives me a lot of linker errors for the TouchGFX code:

ld.exe: [...] undefined reference to `typeinfo for touchgfx::Application'
ld.exe: [...] undefined reference to `typeinfo for touchgfx::Container'
ld.exe: [...] undefined reference to `typeinfo for touchgfx::Drawable'
ld.exe: [...] undefined reference to `typeinfo for touchgfx::Container'
ld.exe: [...] undefined reference to `typeinfo for touchgfx::Screen'
ld.exe: [...] undefined reference to `typeinfo for touchgfx::TextAreaWithWildcardBase'
ld.exe: [...] undefined reference to `typeinfo for touchgfx::Image'
ld.exe: [...] undefined reference to `typeinfo for touchgfx::Screen'
ld.exe: [...] undefined reference to `typeinfo for touchgfx::DMA_Interface'
ld.exe: [...] undefined reference to `typeinfo for touchgfx::AbstractPartition'
ld.exe: [...] undefined reference to `typeinfo for touchgfx::AbstractPartition'
ld.exe: [...] undefined reference to `typeinfo for touchgfx::AbstractPartition'
ld.exe: [...] undefined reference to `typeinfo for touchgfx::HAL'

After a little "research" I think that I would need a TouchGFX lib also compiled with RTTI enabled. Are there any suggestions on how to solve this?

Regards

Tom

When this account seems to be inactive, try @tdecker2 - ST can't change mail addresses, so I had to create a new account.
1 REPLY 1
Osman SOYKURT
ST Employee

Hello TDeck.1,

RTTI is not compatible with TouchGFX, that's why you have these messages. The  -fno_rtti option must stay checked. I'll ask my colleagues but I don't think we have a solution for that unfortunately. I'll get back to you when I have more infos about it.

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX