S_R
July 7, 2024, 2:34pm
1
Hi!
try to build https://github.com/SalavatR/def_exprtk_lua project for web, and got errors
use of dynamic_cast requires -frtti
like this
/exprtk_lua/src/exprtk.hpp
Line 9753: In file included from upload/exprtk_lua/src/exprtk_lua.cpp:10:
use of dynamic_cast requires -frtti
9753 | str_base_ptr_ = dynamic_cast<str_base_ptr>(final_node_.first);
| ^
is there any decision?
Did you try in ext.manifest
?
name: "ExprtkLua"
platforms:
web:
context:
flags: ["-frtti"]
1 Like
In Defold code, we don’t use rtti, as we don’t use classes/inheritance, in order to minimize code size.
I mention it as you’re building a html5 game, where you want to be able to minimize size as much as possible.
You can read more on our code style here:
Since we opened up our source code to contributors, we also get some questions from time to time regarding our choice of coding conventions. These are some of our experiences over the years, and what has led us to our way of developing today.
And also, about our best practices for native extensions:
3 Likes