Cannot use typeid with -fno-rtti错误的解决
来源:互联网 发布:阿里云 包括域名 编辑:程序博客网 时间:2024/06/08 04:15
今天编译我的项目时遇到了 error:flann/any.h:Cannot use typeid with -fno-rtti 这个错误。
google了一下发现是编译器关掉了RTTI (Run-Time Type Information, orRun-Time Type Identification)支持。
然后在makefile 的 CXXFLAGS 里去掉 -fno-rtti即可。
关于RTTL:
The dynamic_cast<>
operation andtypeid
operator in C++ are part of RTTI.
The C++ run-time type information permits performing safetypecasts and manipulate type information at run time.
RTTI is available only for classes which arepolymorphic, which means they have at least one virtual method. In practice, this is not a limitation because base classes must have a virtual destructor to allow objects of derived classes to perform proper cleanup if they are deleted from a base pointer.
RTTI is optional with some compilers; the programmer can choose at compile time whether to include the function. There may be a resource cost to making RTTI available even if the program does not use it.
- Cannot use typeid with -fno-rtti错误的解决
- MAC: cannot use typeid with -fno-rtti
- -fno-rtti -fno-exceptions
- RTTI 之 typeid 的使用
- NDK-error: 'dynamic_cast' not permitted with -fno-rtti
- configure: error: Cannot use an external APR with the bundled APR-utilq错误解决
- rtti的typeid与danamic_cast用法
- C++的RTTI(dynamic_cast与typeid)
- configure: error: Cannot find php-config. Please use --with-php-config=PATH 错误的解决方案
- configure: error: Cannot find php-config. Please use --with-php-config=PATH 错误的解决方案
- configure: error: Cannot find php-config. Please use --with-php-config=PATH 错误的解决方案
- NDk编译google protobuf 出现dynamic_cast not permitted with -fno-rtti
- C++ RTTI(typeid)
- RTTI与typeid
- RTTI(dynamic_cast与typeid)
- typeid及RTTI
- RTTI, dynamic_cast, typeid
- RTTI(typeid、dynamic_cast)
- 对List进行排序的方法
- 隐马尔科夫模型HMM自学(1)
- fastdb一个表支持注册到多个库
- 数字图像处理的研究方法
- MACRO do-while(0) 的几个用法
- Cannot use typeid with -fno-rtti错误的解决
- 那些年,我还在学习Ajax 学习笔记
- Android 自定义RadioButton的样式
- php-Arrays 函数-array_merge_recursive-递归地合并一个或多个数组
- ognl
- ffmpeg命令行选项
- oracle修改字符集
- oracle oui异常
- WinCE 修改系统字体 & 开启ClearType平滑字体