代码之家  ›  专栏  ›  技术社区  ›  Bob

未能生成包含打开的CV头的项目

  •  0
  • Bob  · 技术社区  · 5 年前

    无法使用生成项目 开放简历

    其他包含目录MVS

    C: \OpenCV\build\install\include

    在头文件中:

    #include  < opencv2/core/core.hpp >
    
    #include < opencv2/imgproc/imgproc.hpp >
    

    生成输出

    2>c:\opencv\build\install\include\opencv2\core\cvdef.h(58): error C2059: syntax error: 'namespace'
    2>c:\opencv\build\install\include\opencv2\core\cvdef.h(58): error C2143: syntax error: missing ';' before '{'
    2>c:\opencv\build\install\include\opencv2\core\cvdef.h(58): error C2447: '{': missing function header (old-style formal list?)
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(437): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(437): error C2143: syntax error: missing ';' before '&'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(437): error C2530: 'cv::InputArray': references must be initialized
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(438): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(438): error C2378: 'cv::InputArray': redefinition; symbol cannot be overloaded with a typedef
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(437): note: see declaration of 'cv::InputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(438): error C2146: syntax error: missing ';' before identifier 'InputArrayOfArrays'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(439): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(439): error C2143: syntax error: missing ';' before '&'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(439): error C2530: 'cv::OutputArray': references must be initialized
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(440): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(440): error C2378: 'cv::OutputArray': redefinition; symbol cannot be overloaded with a typedef
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(439): note: see declaration of 'cv::OutputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(440): error C2146: syntax error: missing ';' before identifier 'OutputArrayOfArrays'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(441): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(441): error C2143: syntax error: missing ';' before '&'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(441): error C2530: 'cv::InputOutputArray': references must be initialized
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(442): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(442): error C2378: 'cv::InputOutputArray': redefinition; symbol cannot be overloaded with a typedef
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(441): note: see declaration of 'cv::InputOutputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(442): error C2146: syntax error: missing ';' before identifier 'InputOutputArrayOfArrays'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(444): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(444): error C2040: 'cv::InputOutputArray': 'int' differs in levels of indirection from 'int &'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(444): error C2146: syntax error: missing ';' before identifier 'noArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(1205): error C2061: syntax error: identifier 'OutputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(1213): error C2061: syntax error: identifier 'OutputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(1213): error C2535: 'void cv::Mat::copyTo(void) const': member function already defined or declared
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(1205): note: see declaration of 'cv::Mat::copyTo'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(1228): error C2061: syntax error: identifier 'OutputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(1250): error C2061: syntax error: identifier 'InputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(1317): error C2061: syntax error: identifier 'InputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(1326): error C2061: syntax error: identifier 'InputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(1336): error C2061: syntax error: identifier 'InputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(2442): error C2061: syntax error: identifier 'OutputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(2444): error C2061: syntax error: identifier 'OutputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(2444): error C2535: 'void cv::UMat::copyTo(void) const': member function already defined or declared
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(2442): note: see declaration of 'cv::UMat::copyTo'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(2446): error C2061: syntax error: identifier 'OutputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(2453): error C2061: syntax error: identifier 'InputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(2464): error C2061: syntax error: identifier 'InputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(2467): error C2061: syntax error: identifier 'InputArray'
    2>c:\opencv\build\install\include\opencv2\core\mat.inl.hpp(811): error C2660: 'cv::Mat::copyTo': function does not take 1 arguments
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(1205): note: see declaration of 'cv::Mat::copyTo'
    2>c:\opencv\build\install\include\opencv2\core\mat.inl.hpp(821): error C2660: 'cv::Mat::convertTo': function does not take 2 arguments
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(1228): note: see declaration of 'cv::Mat::convertTo'
    2>c:\opencv\build\install\include\opencv2\core\mat.inl.hpp(3748): error C2660: 'cv::UMat::copyTo': function does not take 1 arguments
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(2442): note: see declaration of 'cv::UMat::copyTo'
    2>c:\opencv\build\install\include\opencv2\core\mat.inl.hpp(3758): error C2660: 'cv::UMat::convertTo': function does not take 2 arguments
    2>c:\opencv\build\install\include\opencv2\core\mat.hpp(2446): note: see declaration of 'cv::UMat::convertTo'
    2>c:\opencv\build\install\include\opencv2\core.hpp(308): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(348): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(388): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(413): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(441): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(445): error C2061: syntax error: identifier 'InputArray'
    2>c:\opencv\build\install\include\opencv2\core.hpp(466): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(494): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(522): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(535): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(551): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(560): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(569): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(597): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(610): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(632): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(671): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(684): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(711): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(718): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(782): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(812): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(840): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(879): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(900): error C2061: syntax error: identifier 'OutputArray'
    2>c:\opencv\build\install\include\opencv2\core.hpp(908): error C2146: syntax error: missing ')' before identifier 'mv'
    2>c:\opencv\build\install\include\opencv2\core.hpp(931): error C2146: syntax error: missing ')' before identifier 'm'
    2>c:\opencv\build\install\include\opencv2\core.hpp(991): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1007): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1016): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1024): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1058): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1076): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1091): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1123): error C2061: syntax error: identifier 'OutputArray'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1144): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1163): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1185): error C2061: syntax error: identifier 'OutputArray'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1209): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1227): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1254): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1281): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1309): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1326): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1352): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1364): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1384): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1413): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1426): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1447): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1466): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1491): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1507): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1520): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1542): error C2146: syntax error: missing ')' before identifier 'magnitude'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1563): error C2146: syntax error: missing ')' before identifier 'x'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1583): error C2146: syntax error: missing ')' before identifier 'x'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1597): error C2146: syntax error: missing ')' before identifier 'x'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1614): error C2146: syntax error: missing ')' before identifier 'a'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1619): error C2146: syntax error: missing ')' before identifier 'a'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1649): error C2146: syntax error: missing ')' before identifier 'src1'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1680): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1693): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1719): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1746): error C2146: syntax error: missing ')' before identifier 'src'
    2>c:\opencv\build\install\include\opencv2\core.hpp(1746): fatal error C1003: error count exceeds 100; stopping compilation
    
    
    0 回复  |  直到 5 年前
        1
  •  0
  •   Bob    5 年前

    除了白手起家创建一个项目,没有任何帮助。不知怎的,以前设置的设置影响了正常生成。