Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 9 months ago. This question has been closed. Reason: This topic moved to http://mbed.org/forum/bugs-suggestions/topic/4494/
Identifier "typeid" is undefined problem
Hello,
I try to compile following code. But mbed compiler say ""Identifier "typeid" is undefined" in file "/main.cpp", Line: 12, Col: 1"
Can't current mbed compiler use typeid?
sample
#include "mbed.h" #include <typeinfo> DigitalOut myled(LED1); class A { }; int main() { A a; if(typeid(a)==typeid(A)){ myled=1; } }
3 Answers
10 years, 9 months ago.
Hello Ryo lizuka,
RTTI is disabled by default which typeid requires. You can export it to any offline tool and turn RTTI back on. Your example compiles without error with rtti compiler option set.
Regards,
0xc0170
10 years, 9 months ago.
Hello Martin-san,
Thank you for response.
It was possible to compile by previous mbed compiler. I want to know whether the problem is temporary or not. Do you know the information for that?
Regards.
This topic moved to http://mbed.org/forum/bugs-suggestions/topic/4494/
posted by Ryo Iizuka 06 Aug 2013