方法参数中的 OpenCV 垫"预期")""
OpenCV Mat 'expected ")"' in method parameter
我当前正在开发一个Mac应用程序,该应用程序涉及将C 和目标C混合。我试图将一部分应用程序分开为CPP源文件编译。
牢记我是非常适合使用C 的新手,如果我犯了一个非常愚蠢的错误,请原谅我。
我已经设法将其削减到了我可能的最小示例中。由于某种原因,当我在方法声明中使用Mat
数据类型时,我得到
expected ')'
我的标题文件
#ifndef MATCHTEMPLATES_H
#define MATCHTEMPLATES_H
#include "opencv2/opencv.hpp"
class Matcher {
public:
Matcher(cv::Mat& template);
};
#endif
我的源文件
#include "Matcher.hpp"
using namespace cv;
Matcher::Matcher(Mat& template) { }
编译命令
clang++ -isystem /usr/local/Cellar/opencv3/3.1.0_3/include/opencv -isystem /usr/local/Cellar/opencv3/3.1.0_3/include -o CMakeFiles/Tracker.dir/source/cpp/Matcher.cpp.o -c {project location}/source/cpp/Matcher.cpp
是的,愚蠢的错误。
显然"模板"是C 中的保留单词
感谢塞巴斯蒂安·霍夫曼(Sebastian Hoffman)指出了这一点...
相关文章:
- 来自 std::list 的迭代器 .end() 按预期返回"0xcdcdcdcdcdcdcdcd"但 .begin()
- C++,OpenCV,尝试显示图像时"OpenCV(4.3.0) Error: Assertion failed (size.width>0 && size.height>0)"此错误
- 尝试导入pybind-opencv模块时出现libgtk错误
- 在编译C++代码(具有dlib和opencv)到WASM时面临问题
- 如何使用OpenCV将RBG图像转换为HSV,并将H、S和V值保存为C++中的3个独立图像
- OpenCV EqualizeHist()从彩色图像创建黑白图像
- 将OpenCV C++重写为EmguCV C#-如何使用指针
- 如何修复函数样式强制转换或类型构造的预期"("?
- OpenCV C++.快速计算混淆矩阵
- 为什么我的 std::ref 无法按预期工作?
- 在C++代码中包含opencv时,使用ctypes创建.so文件
- '||'之前的预期主要表达
- 标记 '","' 之前的预期主表达式
- 哪些库可以通过Opencv调整曝光率
- 方法参数中的 OpenCV 垫"预期")""
- C++ - 错误:为 OpenCV 的 cv::标量::all 创建 C 包装器时出现预期的类型说明符
- 为什么OpenCV Mat对象在嵌套for循环中指定了预期值后却不包含这些值
- 内存不足预期OpenCV C++
- 为什么我在图像大小如预期时会出现opencv错误
- OpenCV(C++)矩阵发布未按预期运行