Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class compilation troubles of the Matlab bindings #140

Open
vins31 opened this issue Nov 30, 2014 · 0 comments
Open

Class compilation troubles of the Matlab bindings #140

vins31 opened this issue Nov 30, 2014 · 0 comments

Comments

@vins31
Copy link

vins31 commented Nov 30, 2014

Good morning,

I would like to start with a thumb up on all the work made by the maintainers of the OpenCV and OpenCV-contrib projects.

As mentioned in this post, I have noticed the files corresponding to class bindings generated in modules/matlab/src/private/ are not compiled.
This behaviour is due to the following line in the modules/matlab/compile.cmake file

file(GLOB SOURCE_FILES "${CMAKE_CURRENT_BINARY_DIR}/src/*.cpp")
# [...]

After modifications to compiles the files in this private/ folder, I ran into various errors:

Firstly, I have seen in generator/templates/template_class_base.cpp:22

typedef std::vector<Bridge> (*)({{clss.name}}&, const std::vector<Bridge>&) MethodSignature;

I am not a C++ expert but I do not think it will generate valid C++. I think it should be:

typedef std::vector<Bridge> MethodSignature({{clss.name}}&, const std::vector<Bridge>&);
// or C++11 variant:
using MethodSignature = std::vector<Bridge> (*)({{clss.name}}&, const std::vector<Bridge>&);

Then, according to my compilers errors, I think the std::vector<Bridge>& input parameter should not be declared const.

According to some Ptr_XXX not defined, I guess this module is still a work in progress.

Environment used

  • Ubuntu 12.04.2
  • gcc 4.7.4
  • Matlab 2014a
bmegli pushed a commit to Extend-Robotics/opencv_contrib that referenced this issue Jul 11, 2022
Revert "Migrate to 1.4, reduce frame size for rtab"
allnes pushed a commit to allnes/opencv_contrib that referenced this issue Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants