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

make build.sh error #3

Closed
Tacode opened this issue Nov 5, 2018 · 12 comments
Closed

make build.sh error #3

Tacode opened this issue Nov 5, 2018 · 12 comments

Comments

@Tacode
Copy link

Tacode commented Nov 5, 2018

Thanks for your work! I try to run the build.sh ,but I meet a problems,could you help me?

error: cannot declare variable ‘DynaSLAM::g_numpyAllocator’ to be of abstract type ‘DynaSLAM::NumpyAllocator’ NumpyAllocator g_numpyAllocator;

@Tacode
Copy link
Author

Tacode commented Nov 5, 2018

This problem was solved when the OpenCv2 was installed.

@BertaBescos
Copy link
Owner

Ok great! I close the issue.

@cumtchenchang
Copy link

@BertaBescos I also met this error, but all my code depend on opencv3. I tried use this code with opencv2.4, the error is still on. Please help me, thank you.

@cumtchenchang
Copy link

error information:
/home/cc/catkin_ws/src/DynaSLAM/src/Conversion.cc:205:16: error: cannot declare variable ‘DynaSLAM::g_numpyAllocator’ to be of abstract type ‘DynaSLAM::NumpyAllocator’
NumpyAllocator g_numpyAllocator;
/home/cc/catkin_ws/src/DynaSLAM/src/Conversion.cc:74:7: note: because the following virtual functions are pure within ‘DynaSLAM::NumpyAllocator’:

@BertaBescos
Copy link
Owner

Have you checked if it is finding the correct version of OpenCV? These lines in the CMake should tell you what version of OpenCV it is finding:
message("PROJECT_SOURCE_DIR: " ${OpenCV_DIR})
find_package(OpenCV 2.4.11 QUIET)
if(NOT OpenCV_FOUND)
message("OpenCV > 2.4.11 not found.")
find_package(OpenCV 3.0 QUIET)
if(NOT OpenCV_FOUND)
message(FATAL_ERROR "OpenCV > 3.0 not found.")
endif()
endif()

@cumtchenchang
Copy link

I checked, find opencv 3.0. cmake .. sucessfully. However, make with this error

@BertaBescos
Copy link
Owner

So the problem is that it is not finding OpenCV 2.4. It is only finding OpenCV 3.0, which is not yet supported.

@cumtchenchang
Copy link

Thank you for your response. May you make your code support opencv3? OpenCV3 is used often, now.

@BertaBescos
Copy link
Owner

Yes, we plan to support OpenCV 3.0 but I am not sure how long it can take us. Many functions changed from OpenCV 2.4 to OpenCV 3.0 in the MatAllocator class. It is in the communication with python where there are a few issues in using OpenCV 3.0 for the moment.

@undefinedzero
Copy link

undefinedzero commented Feb 21, 2019

@BertaBescos I found a way to solve this problem. In OpenCV 3.X, MatAllocator class has three pure virtual functions and they are const member functions, but in the file src/Conversion.cc, the functions missed the word const.

@jmfacil
Copy link
Collaborator

jmfacil commented Feb 21, 2019

@BertaBescos I found a way to solve this problem. In OpenCV 3.X, MatAllocator class has three pure virtual functions and they are const member functions, but in the file src/Conversion.cc, the functions missed the word const.

Thanks! we will add OpenCV 3.X support asap.

@Rushmian
Copy link

@BertaBescos I found a way to solve this problem. In OpenCV 3.X, MatAllocator class has three pure virtual functions and they are const member functions, but in the file src/Conversion.cc, the functions missed the word const.

@undefinedzero how did you solve it? Could you explain a bit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants