daldegam
Topic Author
Posts: 6
Joined: 17 Jan 2020, 14:54

NativeSDK - RTTI Support

08 Dec 2020, 13:26

Hello!

I need to know if it is possible to Noesis NativeSDK for Android (Noesis.so) to be compiled with RTTI enabled.
I know that Noesis doesn't need of RTTI, but my project does.

It is already a big project that we are implementing the noesis engine.

We were able to work with noesis on our Windows project with visual studio, but when we compile the android version, the compiler doesn't link successfully because noesis.so is compiled with -fno-rtti.

Thanks in advance,
Leandro Daldegam

---

Some linker errors:
error: undefined reference to 'typeinfo for Noesis::BaseObject'
error: undefined reference to 'typeinfo for Noesis::BaseComponent'
error: undefined reference to 'typeinfo for Noesis::UserControl'
error: undefined reference to 'typeinfo for Noesis::ValueStorageManager'
error: undefined reference to 'typeinfo for Noesis::BoxedValue'
error: undefined reference to 'typeinfo for Noesis::TypeProperty'
error: undefined reference to 'typeinfo for Noesis::Grid'
error: undefined reference to 'typeinfo for Noesis::BaseComponent'
error: undefined reference to 'typeinfo for Noesis::Canvas'
error: undefined reference to 'typeinfo for Noesis::UIElement'

Tags:
 
mdube
Posts: 15
Joined: 23 Aug 2019, 12:14

Re: NativeSDK - RTTI Support

08 Dec 2020, 14:48

Hi,

The workaround we use is to disable rtti for files that uses/includes Noesis headers. We are using cmake for android too, so for each file we add this:
set_source_files_properties(src/GUI/MainGUI/MainGUI.cpp PROPERTIES COMPILE_FLAGS -fno-rtti)
Then you have to keep clean and separate interfaces between the code using Noesis and the rest of your code.

This is not perfect, but it works.
 
User avatar
jsantos
Site Admin
Posts: 3015
Joined: 20 Jan 2012, 17:18
Contact:

Re: NativeSDK - RTTI Support

08 Dec 2020, 14:49

Hi Leandro, I would say this is a bug because I see RTTI enabled for Linux and not for Android in our SDK. If I am not missing something here, this should be fixed, could you please create a report about it?

Thanks!
 
daldegam
Topic Author
Posts: 6
Joined: 17 Jan 2020, 14:54

Re: NativeSDK - RTTI Support

08 Dec 2020, 15:15

Hi,

The workaround we use is to disable rtti for files that uses/includes Noesis headers. We are using cmake for android too, so for each file we add this:
set_source_files_properties(src/GUI/MainGUI/MainGUI.cpp PROPERTIES COMPILE_FLAGS -fno-rtti)
Then you have to keep clean and separate interfaces between the code using Noesis and the rest of your code.

This is not perfect, but it works.
Thanks for your reply! I will try this until the bug is not fixed;
Hi Leandro, I would say this is a bug because I see RTTI enabled for Linux and not for Android in our SDK. If I am not missing something here, this should be fixed, could you please create a report about it?

Thanks!
Right! So here it is with some steps to reproduce with the Noesis Samples folder: https://www.noesisengine.com/bugs/view.php?id=1855

Thank you guys.

Who is online

Users browsing this forum: Bing [Bot] and 0 guests