Need help! Building project "opencv_rgbd" FAILED [closed]

asked 2020-02-06 19:22:02 -0600

cx gravatar image

updated 2020-02-07 01:14:53 -0600

berak gravatar image

I am using the latest opencv4.20 + visual studio2019 + CUDA10.2, following is the error message:

image description

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug x64 ------
2>------ Build started: Project: opencv_rgbd, Configuration: Debug x64 ------
2>dynafu.cpp
2>E:\OpenCV4.2\SourceCode\opencv_contrib-4.2.0\modules\rgbd\src\dynafu.cpp(242,28): warning C4244: '=': conversion from 'double' to '_Tp', possible loss of data
2>        with
2>        [
2>            _Tp=float
2>        ]
2>E:\OpenCV4.2\SourceCode\opencv_contrib-4.2.0\modules\rgbd\src\dynafu.cpp(206): message : while compiling class template member function 'void cv::dynafu::DynaFuImpl<cv::Mat>::drawScene(cv::OutputArray,cv::OutputArray)'
2>E:\OpenCV4.2\SourceCode\opencv_contrib-4.2.0\modules\rgbd\src\dynafu.cpp(524): message : see reference to function template instantiation 'void cv::dynafu::DynaFuImpl<cv::Mat>::drawScene(cv::OutputArray,cv::OutputArray)' being compiled
2>E:\OpenCV4.2\SourceCode\opencv_contrib-4.2.0\modules\rgbd\src\dynafu.cpp(273): message : while compiling class template member function 'cv::dynafu::DynaFuImpl<cv::Mat>::~DynaFuImpl(void)'
2>E:\OpenCV4.2\SourceCode\opencv_contrib-4.2.0\modules\rgbd\src\dynafu.cpp(289): message : see reference to class template instantiation 'cv::dynafu::DynaFuImpl<cv::Mat>' being compiled
2>E:\OpenCV4.2\SourceCode\opencv_contrib-4.2.0\modules\rgbd\src\dynafu.cpp(181,5): error C3861: 'glGenRenderbuffersEXT': identifier not found
2>E:\OpenCV4.2\SourceCode\opencv_contrib-4.2.0\modules\rgbd\src\dynafu.cpp(169): message : while compiling class template member function 'cv::dynafu::DynaFuImpl<cv::Mat>::DynaFuImpl(const cv::dynafu::Params &)'
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\xmemory(204): message : see reference to function template instantiation 'cv::dynafu::DynaFuImpl<cv::Mat>::DynaFuImpl(const cv::dynafu::Params &)' being compiled
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1491): message : see reference to function template instantiation 'void std::_Construct_in_place<_Ty,const cv::dynafu::Params&>(_Ty &,const cv::dynafu::Params &) noexcept(false)' being compiled
2>        with
2>        [
2>            _Ty=cv::dynafu::DynaFuImpl<cv::Mat>
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1591): message : see reference to function template instantiation 'std::_Ref_count_obj2<_Ty>::_Ref_count_obj2<const cv::dynafu::Params&>(const cv::dynafu::Params &)' being compiled
2>        with
2>        [
2>            _Ty=cv::dynafu::DynaFuImpl<cv::Mat>
2>        ]
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1591): message : see reference to function template instantiation 'std::_Ref_count_obj2<_Ty>::_Ref_count_obj2<const cv::dynafu::Params&>(const cv::dynafu::Params &)' being compiled
2>        with
2>        [
2>            _Ty=cv::dynafu::DynaFuImpl<cv::Mat>
2>        ]
2>E:\OpenCV4.2\SourceCode\opencv-4.2.0\modules\core\include\opencv2\core\cvstd_wrapper.hpp(146): message : see reference to function template instantiation 'std::shared_ptr<T> std::make_shared<_Tp,const _Ty&>(const _Ty &)' being compiled
2>        with
2>        [
2>            T=cv::dynafu::DynaFuImpl<cv::Mat>,
2>            _Tp=cv::dynafu::DynaFuImpl<cv::Mat>,
2>            _Ty=cv::dynafu::Params
2>        ]
2>E:\OpenCV4.2\SourceCode\opencv_contrib-4.2.0\modules\rgbd\src\dynafu.cpp(544): message : see reference to function template instantiation 'cv::Ptr<cv::dynafu::DynaFuImpl<cv::Mat>> cv::makePtr<cv::dynafu::DynaFuImpl<cv::Mat> ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by LBerger
close date 2020-02-07 04:58:53.092889

Comments

do you actually need the rgbd module ? you could try to disable it, like

cmake -DBUILD_opencv_rgbd=OFF
berak gravatar imageberak ( 2020-02-07 01:16:56 -0600 )edit
2

rgbd module is not compatible with visual studio. Issue here

LBerger gravatar imageLBerger ( 2020-02-07 01:20:12 -0600 )edit
1

Thank you very much, I'll remove modelrgbd form my building.

cx gravatar imagecx ( 2020-02-07 03:16:01 -0600 )edit