Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Errors building OpenCV-2.4.6 with Visual Studio 2013

I aI am attempting to build OpenCV with VC12 and have encountered an error I can't figure out. Here is the error

opencv\modules\core\include\opencv2/core.hpp(1136): fatal error C1075: end of file found before the left brace '{' at '......\modules\features2d\src\features2d_init.cpp(182)' was matched

Snip from core.hpp

  template<typename _Tp> void addParam(Algorithm& algo, const char* name,
              Ptr<_Tp>& value, bool readOnly=false,
              Ptr<_Tp> (Algorithm::*getter)()=0,
              void (Algorithm::*setter)(const Ptr<_Tp>&)=0,//LINE 1136
              const String& help=String());

Snip from features2d_init.cpp

CV_INIT_ALGORITHM(GridAdaptedFeatureDetector, "Feature2D.Grid",
              obj.info()->addParam(obj, "detector", obj.detector);
              obj.info()->addParam(obj, "maxTotalKeypoints", obj.maxTotalKeypoints);
              obj.info()->addParam(obj, "gridRows", obj.gridRows);
              obj.info()->addParam(obj, "gridCols", obj.gridCols));//LINE 182

Any help is appreciated.

Errors building OpenCV-2.4.6 with Visual Studio 2013

I aI am attempting to build OpenCV with VC12 and have encountered an error I can't figure out. Here is the error

opencv\modules\core\include\opencv2/core.hpp(1136): fatal error C1075: end of file found before the left brace '{' at '......\modules\features2d\src\features2d_init.cpp(182)' was matched

Snip from core.hpp

  template<typename _Tp> void addParam(Algorithm& algo, const char* name,
              Ptr<_Tp>& value, bool readOnly=false,
              Ptr<_Tp> (Algorithm::*getter)()=0,
              void (Algorithm::*setter)(const Ptr<_Tp>&)=0,//LINE 1136
              const String& help=String());

Snip from features2d_init.cpp

CV_INIT_ALGORITHM(GridAdaptedFeatureDetector, "Feature2D.Grid",
              obj.info()->addParam(obj, "detector", obj.detector);
              obj.info()->addParam(obj, "maxTotalKeypoints", obj.maxTotalKeypoints);
              obj.info()->addParam(obj, "gridRows", obj.gridRows);
              obj.info()->addParam(obj, "gridCols", obj.gridCols));//LINE 182

And here is the macro definition from private.hpp

#define CV_INIT_ALGORITHM(classname, algname, memberinit) \
static ::cv::Algorithm* create##classname##_hidden() \
{ \
    return new classname; \
} \
\
static ::cv::AlgorithmInfo& classname##_info() \
{ \
    static ::cv::AlgorithmInfo classname##_info_var(algname, create##classname##_hidden); \
    return classname##_info_var; \
} \
\
static ::cv::AlgorithmInfo& classname##_info_auto = classname##_info(); \
\
::cv::AlgorithmInfo* classname::info() const \
{ \
    static volatile bool initialized = false; \
    \
    if( !initialized ) \
    { \
        initialized = true; \
        classname obj; \
        memberinit; \
    } \
    return &classname##_info(); \
}

Any help is appreciated.

Errors building OpenCV-2.4.6 with Visual Studio 2013

I aI am attempting to build OpenCV with VC12 and have encountered an error I can't figure out. Here is the error

opencv\modules\core\include\opencv2/core.hpp(1136): fatal error C1075: end of file found before the left brace '{' at '......\modules\features2d\src\features2d_init.cpp(182)' was matched

Snip from core.hpp

  template<typename _Tp> void addParam(Algorithm& algo, const char* name,
              Ptr<_Tp>& value, bool readOnly=false,
              Ptr<_Tp> (Algorithm::*getter)()=0,
              void (Algorithm::*setter)(const Ptr<_Tp>&)=0,//LINE 1136
              const String& help=String());

Snip from features2d_init.cpp

CV_INIT_ALGORITHM(GridAdaptedFeatureDetector, "Feature2D.Grid",
              obj.info()->addParam(obj, "detector", obj.detector);
              obj.info()->addParam(obj, "maxTotalKeypoints", obj.maxTotalKeypoints);
              obj.info()->addParam(obj, "gridRows", obj.gridRows);
              obj.info()->addParam(obj, "gridCols", obj.gridCols));//LINE 182

And here is the macro definition from private.hpp

#define CV_INIT_ALGORITHM(classname, algname, memberinit) \
static ::cv::Algorithm* create##classname##_hidden() \
{ \
    return new classname; \
} \
\
static ::cv::AlgorithmInfo& classname##_info() \
{ \
    static ::cv::AlgorithmInfo classname##_info_var(algname, create##classname##_hidden); \
    return classname##_info_var; \
} \
\
static ::cv::AlgorithmInfo& classname##_info_auto = classname##_info(); \
\
::cv::AlgorithmInfo* classname::info() const \
{ \
    static volatile bool initialized = false; \
    \
    if( !initialized ) \
    { \
        initialized = true; \
        classname obj; \
        memberinit; \
    } \
    return &classname##_info(); \
}

Any help is appreciated.