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

How to run this code? #8

Open
mwy691222563 opened this issue Dec 14, 2018 · 6 comments
Open

How to run this code? #8

mwy691222563 opened this issue Dec 14, 2018 · 6 comments

Comments

@mwy691222563
Copy link

mwy691222563 commented Dec 14, 2018

usr/local/include/opencv2/core/cvstd.hpp:556:5: error: ‘cv::String::String(int)’ is private
String(int); // disabled and invalid. Catch invalid usages like, commandLineParser.has(0) problem
^
In file included from /usr/include/c++/5/bits/stl_tempbuf.h:60:0,
from /usr/include/c++/5/bits/stl_algo.h:62,
from /usr/include/c++/5/algorithm:62,
from /usr/local/include/opencv2/core/base.hpp:55,
from /usr/local/include/opencv2/core.hpp:54,
from /usr/local/include/opencv2/opencv.hpp:52,
from mtcnn_opencv.cpp:4:
/usr/include/c++/5/bits/stl_construct.h:83:7: error: within this context
::new(static_cast<void*>(__p)) _T1(__value);

@graycrown
Copy link

I am in the same condition, have you solved it?

@graycrown
Copy link

If you run this code on ubuntu , try "g++ -o mtcnn_opencv mtcnn_opencv.cpp -std=c++11", it seems like that the error is caused by C++11 new feature.

@jhgfkdj
Copy link

jhgfkdj commented Apr 4, 2019

@graycrown @mwy691222563 Please help me to run this code. I use cmake and make way to generate it, but errors ocured:

/mtcnn_opencv.cpp.o:在函数‘MTCNN::MTCNN(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)’中:
mtcnn_opencv.cpp:(.text+0xae):对‘cv::dnn::experimental_dnn_v4::Net::Net()’未定义的引用
mtcnn_opencv.cpp:(.text+0xc1):对‘cv::dnn::experimental_dnn_v4::Net::Net()’未定义的引用
mtcnn_opencv.cpp:(.text+0xd4):对‘cv::dnn::experimental_dnn_v4::Net::Net()’未定义的引用
mtcnn_opencv.cpp:(.text+0x174):对‘cv::dnn::experimental_dnn_v4::readNetFromCaffe(cv::String const&, cv::String const&)’未定义的引用
mtcnn_opencv.cpp:(.text+0x19c):对‘cv::dnn::experimental_dnn_v4::Net::~Net()’未定义的引用
....

I dont know where the wrong is.
If it's the path problem, I did setted and included the opencv path.

@mwy691222563
Copy link
Author

it seems some libs should be linked.

@jhgfkdj
Copy link

jhgfkdj commented Apr 8, 2019

@mwy691222563 yeah I found some opencv libs should be linked in CMakeLists file. thx~~

@scutzhe
Copy link

scutzhe commented Aug 5, 2019

It's the same quesion @graycrown how do you solve

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

4 participants