Ask Your Question

Revision history [back]

Building OpenCV 3.1.0 on Windows with viz3d

Hi,

I tried to build opencv 3.1.0 from source on windows (windows 10, visual studio 2015, 64 bit), to get the viz3d module. I downloaded and build the vtk (I tried both 7.0.0 and 6.3.0). But I get the following error on building

Error C2143 syntax error: missing ';' before '*'
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C2825 'cv::viz::vtkCloudMatSink': must be a class or namespace when followed by '::' Error C2510 'vtkCloudMatSink': left of '::' must be a class/struct/union
Error C2059 syntax error: '{'
Error C2143 syntax error: missing ';' before '{'
Error C2447 '{': missing function header (old-style formal list?)
Error C3083 'vtkCloudMatSink': the symbol to the left of a '::' must be a type
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C2063 'cv::viz::vtkCloudMatSink': not a function
Error C2084 function 'int cv::viz::vtkCloudMatSink' already has a body
Error C3755 'vtkCloudMatSink': a delegate may not be defined
Error C3083 'vtkCloudMatSink': the symbol to the left of a '::' must be a type
Error C2588 '::~vtkCloudMatSink': illegal global destructor
Error C1903 unable to recover from previous error(s); stopping compilation
in \vizsrc\vtk\vtkCloudMatSink.cpp 55 Error C2065 'vtkCloudMatSource': undeclared identifier
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C2065 'VTK_FLOAT': undeclared identifier
Error C2131 expression did not evaluate to a constant
Error C3646 'array_type': unknown override specifier
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C2065 'VTK_DOUBLE': undeclared identifier
Error C2131 expression did not evaluate to a constant
Error C3646 'array_type': unknown override specifier
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C3083 'vtkCloudMatSource': the symbol to the left of a '::' must be a type
Error C2039 'vtkCloudMatSource': is not a member of 'cv::viz'
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C3861 'SetNumberOfInputPorts': identifier not found
Error C3083 'vtkCloudMatSource': the symbol to the left of a '::' must be a type
Error C2588 '::~vtkCloudMatSource': illegal global destructor
Error C1903 unable to recover from previous error(s); stopping compilation
Error C2065 'vtkImageMatSource': undeclared identifier
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C3083 'vtkImageMatSource': the symbol to the left of a '::' must be a type
Error C2039 'vtkImageMatSource': is not a member of 'cv::viz'
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C2355 'this': can only be referenced inside non-static member functions or non-static data member initializers
Error C2227 left of '->SetNumberOfInputPorts' must point to class/struct/union/generic type
Error C2355 'this': can only be referenced inside non-static member functions or non-static data member initializers
Error C2227 left of '->ImageData' must point to class/struct/union/generic type
Error C2065 'vtkSmartPointer': undeclared identifier
Error C2065 'vtkImageData': undeclared identifier
Error C2039 'New': is not a member of '`global namespace''
Error C3861 'New': identifier not found
Error C3083 'vtkImageMatSource': the symbol to the left of a '::' must be a type
Error C2039 'RequestInformation': is not a member of 'cv::viz'
Error C2065 'vtkInformation': undeclared identifier
Error C2059 syntax error: ','
Error C2143 syntax error: missing ';' before '{'
Error C2447 '{': missing function header (old-style formal list?)
Error C3083 'vtkImageMatSource': the symbol to the left of a '::' must be a type
Error C2039 'RequestData': is not a member of 'cv::viz'
Error C2065 'vtkInformation': undeclared identifier
Error C2059 syntax error: ','
Error C2143 syntax error: missing ';' before '{'
Error C2447 '{': missing function header (old-style formal list?)
Error C3083 'vtkImageMatSource': the symbol to the left of a '::' must be a type
Error C2039 'SetImage': is not a member of 'cv::viz'
Error C2065 'InputArray': undeclared identifier
Error C2146 syntax error: missing ')' before identifier '_image'
Error C2143 syntax error: missing ';' before '{'
Error C2447 '{': missing function header (old-style formal list?)
Error C3083 'vtkImageMatSource': the symbol to the left of a '::' must be a type
Error C2039 'copyGrayImage': is not a member of 'cv::viz'
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C2143 syntax error: missing ',' before '&'
Error C2065 'output': undeclared identifier
Error C2227 left of '->GetScalarPointer' must point to class/struct/union/generic type
Error C2065 'output': undeclared identifier
Error C2227 left of '->GetIncrements' must point to class/struct/union/generic type
Error C2065 'source': undeclared identifier
Error C2228 left of '.rows' must have class/struct/union
Error C2065 'source': undeclared identifier
Error C2228 left of '.ptr' must have class/struct/union
Error C2062 type 'unsigned char' unexpected
Error C2065 'source': undeclared identifier
Error C2228 left of '.cols' must have class/struct/union
Error C3083 'vtkImageMatSource': the symbol to the left of a '::' must be a type
Error C2039 'copyRGBImage': is not a member of 'cv::viz'
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C2143 syntax error: missing ',' before '&'
Error C2065 'Vec3b': undeclared identifier
Error C2065 'dptr': undeclared identifier
Error C2061 syntax error: identifier 'Vec3b'
Error C2065 'output': undeclared identifier
Error C2227 left of '->GetIncrements' must point to class/struct/union/generic type
Error C2065 'Vec3b': undeclared identifier
Error C2065 'source': undeclared identifier
Error C2228 left of '.rows' must have class/struct/union
Error C2065 'Vec3b': undeclared identifier
Error C2065 'drow': undeclared identifier
Error C2065 'dptr': undeclared identifier
Error C2065 'source': undeclared identifier
Error C2228 left of '.ptr' must have class/struct/union
Error C2062 type 'unsigned char' unexpected
Error C2065 'source': undeclared identifier
Error C2228 left of '.cols' must have class/struct/union
Error C2228 left of '.channels' must have class/struct/union
Error C2065 'drow': undeclared identifier
Error C3861 'Vec3b': identifier not found
Error C3083 'vtkImageMatSource': the symbol to the left of a '::' must be a type
Error C2039 'copyRGBAImage': is not a member of 'cv::viz'
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C2143 syntax error: missing ',' before '&'
Error C2065 'Vec4b': undeclared identifier
Error C2065 'dptr': undeclared identifier
Error C2061 syntax error: identifier 'Vec4b'
Error C2065 'output': undeclared identifier
Error C2227 left of '->GetIncrements' must point to class/struct/union/generic type
Error C2065 'Vec4b': undeclared identifier
Error C2065 'source': undeclared identifier
Error C2228 left of '.rows' must have class/struct/union
Error C2065 'Vec4b': undeclared identifier
Error C2065 'drow': undeclared identifier
Error C2065 'dptr': undeclared identifier
Error C2065 'source': undeclared identifier
Error C2228 left of '.ptr' must have class/struct/union
Error C2062 type 'unsigned char' unexpected
Error C2065 'source': undeclared identifier
Error C2228 left of '.cols' must have class/struct/union
Error C2228 left of '.channels' must have class/struct/union
Error C2065 'drow': undeclared identifier
Error C3861 'Vec4b': identifier not found
in \viz\src\vtk\vtkImageMatSource.cpp Error C2065 'vtkOBJWriter': undeclared identifier
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C3083 'vtkOBJWriter': the symbol to the left of a '::' must be a type
Error C2039 'vtkOBJWriter': is not a member of 'cv::viz'
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C2079 'fout' uses undefined class 'std::basic_ofstream<char,std::char_traits<char>>'
Error C2355 'this': can only be referenced inside non-static member functions or non-static data member initializers
Error C2227 left of '->DecimalPrecision' must point to class/struct/union/generic type
Error C2228 left of '.precision' must have class/struct/union
Error C2355 'this': can only be referenced inside non-static member functions or non-static data member initializers
Error C2227 left of '->FileName' must point to class/struct/union/generic type
Error C3083 'vtkOBJWriter': the symbol to the left of a '::' must be a type
Error C2588 '::~vtkOBJWriter': illegal global destructor
Error C1903 unable to recover from previous error(s); stopping compilation
in \viz\src\vtk\vtkOBJWriter.cpp Error C2065 'vtkTrajectorySource': undeclared identifier
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C3083 'vtkTrajectorySource': the symbol to the left of a '::' must be a type
Error C2039 'vtkTrajectorySource': is not a member of 'cv::viz'
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C3861 'SetNumberOfInputPorts': identifier not found
Error C3083 'vtkTrajectorySource': the symbol to the left of a '::' must be a type
Error C2588 '::~vtkTrajectorySource': illegal global destructor
Error C1903 unable to recover from previous error(s); stopping compilation
in \viz\src\vtk\vtkTrajectorySource.cpp Error C2065 'vtkVizInteractorStyle': undeclared identifier
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C2059 syntax error: '}'
Error C2143 syntax error: missing ';' before '}'
Error C3083 'vtkVizInteractorStyle': the symbol to the left of a '::' must be a type
Error C2039 'vtkVizInteractorStyle': is not a member of 'cv::viz'
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
Error C2065 'FlyMode': undeclared identifier
Error C2065 'MotionFactor': undeclared identifier
Error C2065 'keyboardCallback_': undeclared identifier
Error C2065 'keyboard_callback_cookie_': undeclared identifier
Error C2065 'mouseCallback_': undeclared identifier
Error C2065 'mouse_callback_cookie_': undeclared identifier
Error C2065 'win_size_': undeclared identifier
Error C3861 'Vec2i': identifier not found
Error C2065 'win_pos_': undeclared identifier
Error C3861 'Vec2i': identifier not found
Error C2065 'max_win_size_': undeclared identifier
Error C3861 'Vec2i': identifier not found
Error C2065 'stereo_anaglyph_redblue_': undeclared identifier
Error C2065 'KeysDown': undeclared identifier
Error C2065 'UseTimers': undeclared identifier
Error C2065 'DiagonalLength': undeclared identifier
Error C2065 'MotionStepSize': undeclared identifier
Error C2065 'MotionUserScale': undeclared identifier
Error C2065 'MotionAccelerationFactor': undeclared identifier
Error C2065 'AngleStepSize': undeclared identifier
Error C3083 'vtkVizInteractorStyle': the symbol to the left of a '::' must be a type
in \viz\src\vtk\vtkVizInteractorStyle.cpp

Any help on this would be appreciated.