c++ - Error compiling private.hpp OpenCV 3.0.0-rc1 -


i downloaded opencv 3.0.0-rc1 , build using cmake-gui 3.2.2 using vs2012 win64 compiler. binaries , libraries got generated , set qt 64 bit. programs working fine except when try use feature cv::linesegmentdetector shows compile error in private.hpp file. error says

unexpected end-of-line 

my code follows

#include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgcodecs/imgcodecs.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/core/private.hpp> #include <opencv2/core/utility.hpp>  using namespace std;  int main() {     cv::mat image = cv::imread("c:\\users\\image\\desktop\\proj\\sample.png");     cv::imshow("test",image);     cv::waitkey();      cv::linesegmentdetector lsd;      return 0; } 

and on following error found 2nd line of following part of code in private.hpp error highlighted.

#ifdef have_eigen #  if defined __gnuc__ && defined __apple__ #    pragma gcc diagnostic ignored "-wshadow" #  endif #  include <eigen/core> #  include "opencv2/core/eigen.hpp" #endif     

# if defined __gnuc__ && defined __apple__

please let me know if doing implementation mistake or changes in private.hpp can fix error. using windows 8 64 bit.

oh, never try use something, called "private", guess...

#include <opencv2/opencv.hpp>       // includes others #include <opencv2/core/utility.hpp> // gettickcount, etc.  int main() {     // linesegmentdetector abstract class, can't create     // instance on stack, need use ptr , factory:     cv::ptr<cv::linesegmentdetector> lsd = cv::createlinesegmentdetector();     return 0; } 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -