Переполнение при ошибке со знаком в OpenCV при запуске clibgen.generateLibraryDefinition в MATLAB - PullRequest
0 голосов
/ 12 марта 2020

Я пытаюсь взаимодействовать с MATLAB с существующей библиотекой C ++ (файлы .lib, .dll и .h). Сначала я попытался создать небольшую и простую библиотеку, и в MATLAB все работало нормально. Мне удалось создать интерфейсные файлы и вызвать библиотеку из MATLAB (используя clibgen.generateLibraryDefinition https://se.mathworks.com/help/matlab/ref/clibgen.generatelibrarydefinition.html)

Затем я попытался скомпилировать существующую библиотеку, которую мы уже используем в C ++, с помощью MATLAB , Библиотека C ++ использует некоторые внешние библиотеки, такие как OpenCV и Boost. Я компилирую библиотеку с помощью MATLAB, используя функцию clibgen.generateLibraryDefinition:

clibgen.generateLibraryDefinition('C:\dev\mi-mil\Wrappers\include\NucReader.h', 'Libraries', 'C:\dev\mi-mil\build\mimil-build\bin\Debug\NucReader.lib', 'IncludePath', {'C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include','C:\dev\mi-mil\build\ep\include', 'C:\dev\mi-mil\build\mimil-build\packages\icgi-intelIPP.2019.5.281.1\build\native\include', 'C:\dev\mi-mil\build\ep\include\libtiff', 'C:\dev\mi-mil\build\ep\include\tinyxml'})

Однако, когда я запускаю команду выше, я получаю следующие ошибки:

Errors parsing header file. 
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\mat.hpp:163: overflow on signed constant.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\mat.hpp:2074: overflow on unsigned constant.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\mat.hpp:2548: overflow on unsigned constant.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\mat.hpp:2671: overflow on unsigned constant.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\videoio.hpp:218: overflow on signed constant.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\stitching\detail\warpers.hpp:213: overloaded virtual function "cv::detail::PlaneWarper::buildMaps" is only partially
overridden in class "cv::detail::AffineWarper".
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\stitching\detail\warpers.hpp:213: overloaded virtual function "cv::detail::PlaneWarper::warp" is only partially overridden
in class "cv::detail::AffineWarper".
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\stitching\detail\blenders.hpp:100: overloaded virtual function "cv::detail::Blender::prepare" is only partially overridden
in class "cv::detail::FeatherBlender".
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\stitching\detail\blenders.hpp:127: overloaded virtual function "cv::detail::Blender::prepare" is only partially overridden
in class "cv::detail::MultiBandBlender".
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\videostab\motion_stabilizing.hpp:106: function "cv::videostab::IMotionStabilizer::stabilize(int, const std::vector<cv::Mat,
std::allocator<cv::Mat>> &, std::pair<int, int>, cv::Mat *)" is hidden by "cv::videostab::GaussianMotionFilter::stabilize" -- virtual function override intended?.
C:\dev\mi-mil\build\ep\include\boost\integer\integer_mask.hpp:97: overflow on unsigned constant.
C:\dev\mi-mil\build\ep\include\boost\integer\integer_mask.hpp:100: overflow on unsigned constant.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:45: incomplete type is not allowed.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:49: template instantiation resulted in unexpected function type of "std::true_type
(std::integral_constant<bool, false> *)" (the meaning of a name may have changed since the template declaration -- the type of the template is "std::true_type
(std::is_same<std::decay<decltype((<expression>))>::type, void>::type *)").
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:53: name followed by "::" must be a class or namespace name.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:45: incomplete type is not allowed.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:49: template instantiation resulted in unexpected function type of "std::true_type
(std::integral_constant<bool, false> *)" (the meaning of a name may have changed since the template declaration -- the type of the template is "std::true_type
(std::is_same<std::decay<decltype((<expression>))>::type, void>::type *)").
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:53: name followed by "::" must be a class or namespace name.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:45: incomplete type is not allowed.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:49: template instantiation resulted in unexpected function type of "std::true_type
(std::integral_constant<bool, false> *)" (the meaning of a name may have changed since the template declaration -- the type of the template is "std::true_type
(std::is_same<std::decay<decltype((<expression>))>::type, void>::type *)").
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:53: name followed by "::" must be a class or namespace name.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:45: incomplete type is not allowed.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:49: template instantiation resulted in unexpected function type of "std::true_type
(std::integral_constant<bool, false> *)" (the meaning of a name may have changed since the template declaration -- the type of the template is "std::true_type
(std::is_same<std::decay<decltype((<expression>))>::type, void>::type *)").
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:53: name followed by "::" must be a class or namespace name.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:45: incomplete type is not allowed.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:49: template instantiation resulted in unexpected function type of "std::true_type
(std::integral_constant<bool, false> *)" (the meaning of a name may have changed since the template declaration -- the type of the template is "std::true_type
(std::is_same<std::decay<decltype((<expression>))>::type, void>::type *)").
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:53: name followed by "::" must be a class or namespace name.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:45: incomplete type is not allowed.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:49: template instantiation resulted in unexpected function type of "std::true_type
(std::integral_constant<bool, false> *)" (the meaning of a name may have changed since the template declaration -- the type of the template is "std::true_type
(std::is_same<std::decay<decltype((<expression>))>::type, void>::type *)").
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:53: name followed by "::" must be a class or namespace name.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:45: incomplete type is not allowed.
C:\dev\mi-mil\build\ep\src\OpenCV-build\install\include\opencv2\core\cvstd_wrapper.hpp:49: template instantiation resulted in unexpected function type of "std::true_type
(std::integral_constant<bool, false> *)" (the meaning of a name may have changed since the template declaration -- the type of the template is "std::true_type
(std::is_same<std::decay<decltype((<expression>))>::type, void>::type *)").

Кто-нибудь получил эти ошибки сообщения раньше?

С уважением,

Сондре

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...