iOS中使用opencv碰到这样的编译错误:non-const static data member must be initialized out of line
来源:互联网 发布:淘宝企业店铺可以改吗 编辑:程序博客网 时间:2024/05/04 00:05
The issue seems to be an interference with the default MIN(a,b) macro in one of the iOS frameworks.
Got it working by modifying the following files:
OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp OpenCV-2.2.0/modules/core/include/opencv2/core/operations.hpp
The modification involved creating another MIN macro in both files, I called it __MIN(a,b):
#define __MIN(a,b) ((a)<(b)?(a):(b))
and replacing all MIN(...) calls with __MIN(...).
After the changes opencv compiles without errors.
- iOS中使用opencv碰到这样的编译错误:non-const static data member must be initialized out of line
- 错误:invalid use of non-static data member 'main_form::zhiliu_datainfo'
- reference to non-static member function must be called
- 出现错误"illegal call of non-static member function"?
- c++学习-reference to non-static member function must be called
- iOS-UI之UICollectionView must be initialized with a non-nil layout parameter'解决方式
- must be initialized in constructor base/member initializer list
- only static const integral data members can be initialized within a class
- VS2005 error C2864 only static const integral data members can be initialized within a class
- UICollectionView must be initialized with a non-nil layout parameter
- UICollectionView must be initialized with a non-nil layout parameter
- forbids in-class initialization of non-const static member不能在类内初始化非const static成员
- c++ 编译错误is not a static member of ...
- Argument must be non-nil 断言错误
- Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex
- Relationship of the this pointer and (non-)const member function
- invalid+use+of+non-static+member+function+问题
- Name of an object member must be a string
- 向量的點積和叉積定義
- CheckBox的OnCheckedChangeListener的调用
- VxWorks 操作系统学习笔记
- Matlab之视角旋转函数
- 在Visual Studio中使用MonoTouch开发iOS应用程序(上):环境配置
- iOS中使用opencv碰到这样的编译错误:non-const static data member must be initialized out of line
- 范數
- Android NDK: Host 'awk' tool is outdated. Please define HOST_AWK to point to Gawk or Nawk !
- Javascript绝句欣赏
- 代码片段
- 矩陣奇異值分解
- 齊次坐標
- c# equals与==的区别
- eclipse 中属性文件乱码