electric-sheep-co / arduino-redis

A Redis client library for Arduino.
http://arduino-redis.com
MIT License
54 stars 19 forks source link

'dynamic_cast' not permitted #72

Closed nafraf closed 1 year ago

nafraf commented 1 year ago

Hi, after updating the code to version 2.6.2, master branch, trying to compile Simple.ino or any other example, I'm getting the following error:

/home/user/Arduino/libraries/arduino-redis/RedisInternal.cpp: In member function 'RedisArray::operator std::vector<String>() const':
/home/user/Arduino/libraries/arduino-redis/RedisInternal.cpp:76:72: error: 'dynamic_cast' not permitted with -fno-rtti
             for (auto append_inner : dynamic_cast<RedisArray*>(ro.get())->operator std::vector<String>())

Is it a bug? or maybe a problem with my environment? Thanks

rpj commented 1 year ago

Hey @nafraf, nope that was just a mistake on my part, I forgot that the environment we operate under is quite restrictive indeed. I'll get this fixed ASAP, thanks a ton for flagging it!

rpj commented 1 year ago

@nafraf v2.6.3 will have the fix but it's on master now if you want to just pull that. Apologies & thanks again for flagging it! It's much appreciated 🙇

junghyun-kim commented 1 year ago

Hi! I had a same issue. I could build the code with-frtti build flag successfully. You may need -fexceptions flag also.