C语言下opencv的配置
最近看别人写的软件,想在其中导入Opencv的库,其中部分头文件如下所示
#ifndef _LPRTYPE_H_
#define _LPRTYPE_H_
#include <time.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
在其中加入:
#include<iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
后就出现了如下一大堆错误。
然而调用opencv的函数包括Mat类型等均需要cv::
追踪错误点在:
using _CSTD abs; using _CSTD acos; using _CSTD asin;
using _CSTD atan; using _CSTD atan2; using _CSTD ceil;
using _CSTD cos; using _CSTD cosh; using _CSTD exp;
using _CSTD fabs; using _CSTD floor; using _CSTD fmod;
using _CSTD frexp; using _CSTD ldexp; using _CSTD log;
using _CSTD log10; using _CSTD modf; using _CSTD pow;
using _CSTD sin; using _CSTD sinh; using _CSTD sqrt;
using _CSTD tan; using _CSTD tanh;
刚开始接触不久,不知道该如何解决这个问题。
望各位大神指点,谢谢!
错误:
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(23): error C2061: 语法错误: 标识符“abs”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(23): error C2059: 语法错误:“;”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(23): error C2061: 语法错误: 标识符“acos”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(23): error C2061: 语法错误: 标识符“asin”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(24): error C2061: 语法错误: 标识符“atan”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(24): error C2059: 语法错误:“;”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(24): error C2061: 语法错误: 标识符“atan2”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(24): error C2061: 语法错误: 标识符“ceil”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(25): error C2061: 语法错误: 标识符“cos”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(25): error C2059: 语法错误:“;”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(25): error C2061: 语法错误: 标识符“cosh”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(25): error C2061: 语法错误: 标识符“exp”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(26): error C2061: 语法错误: 标识符“fabs”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(26): error C2059: 语法错误:“;”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(26): error C2061: 语法错误: 标识符“floor”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(26): error C2061: 语法错误: 标识符“fmod”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(27): error C2061: 语法错误: 标识符“frexp”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(27): error C2059: 语法错误:“;”
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cmath(27): error C2061: 语法错误: 标识符“ldexp”
。。。