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

Problem compiling with latest traits.hpp #308

Closed
FallenBuckeye opened this issue Nov 19, 2017 · 8 comments
Closed

Problem compiling with latest traits.hpp #308

FallenBuckeye opened this issue Nov 19, 2017 · 8 comments

Comments

@FallenBuckeye
Copy link

With latest Opencv2, Opencv_contrib, Ceres with eigen3, etc, using the sfm scene reconstruction example cooied into eclipse, I receive the following compile error:
/home/bongo/opencv/modules/core/include/opencv2/core/traits.hpp: In instantiation of ‘struct cv::traits::Type<std::__cxx11::basic_string >’:
/home/bongo/opencv/modules/core/include/opencv2/core/mat.inl.hpp:85:32: required from ‘cv::_InputArray::_InputArray(const std::vector<_Tp>&) [with _Tp = std::__cxx11::basic_string]’
../src/recon.cpp:61:81: required from here
/home/bongo/opencv/modules/core/include/opencv2/core/traits.hpp:366:8: error: ‘type’ is not a member of ‘cv::DataType<std::__cxx11::basic_string >’
{ enum { value = DataType::type }; };
This is a fresh build and git from Nov 19, 2017. Can anyone help?

@vrabaud
Copy link
Contributor

vrabaud commented Nov 20, 2017

Where is the code you are trying to compile ?

@FallenBuckeye
Copy link
Author

FallenBuckeye commented Nov 24, 2017 via email

@llvs
Copy link

llvs commented Feb 13, 2018

To me, the following workaround worked in Windows/Visual Studio:
#define OPENCV_TRAITS_ENABLE_DEPRECATED
Using current OpenCV git version 3.4.0+

@whuhit
Copy link

whuhit commented Jan 30, 2019

To me, the following workaround worked in Windows/Visual Studio:
#define OPENCV_TRAITS_ENABLE_DEPRECATED
Using current OpenCV git version 3.4.0+

it works

@JWhitleyWork
Copy link
Collaborator

Closing due to resolution.

@nidhiratanpara
Copy link

This does not work with the workaround yet. I am using the latest opencv version.

@nidhiratanpara
Copy link

@JWhitleyWork This does not work with the given workaround yet. I am using the latest opencv version.

@JWhitleyWork
Copy link
Collaborator

@nidhiratanpara This is a very old issue. Please create a new issue with your environment details and the error you're seeing.

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