c++ - OpenCV, Undefined symbols for architecture x86_64 error -
i'm trying opencv work on computer - simple programs can work program i'm unable to. error getting follow:
undefined symbols architecture x86_64: "cv::namedwindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)", referenced from: _main in ccux28ge.o "cv::split(cv::mat const&, std::vector<cv::mat, std::allocator<cv::mat> >&)", referenced from: computefocusdpc(std::vector<r_image, std::allocator<r_image> >, int, float, int, int, int, int, cv::mat*) in ccux28ge.o qdpc_loop(std::vector<cv::mat, std::allocator<cv::mat> >, std::vector<cv::mat, std::allocator<cv::mat> >, double) in ccux28ge.o "cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)", referenced from: _main in ccux28ge.o "cv::imshow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_inputarray const&)", referenced from: _main in ccux28ge.o ld: symbol(s) not found architecture x86_64
i'm trying compile file command line
g++-5.1.0 -o qdpc_desktop qdpc.cpp -i. -std=c++11 -ggdb -fopenmp -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_stitching
i know error not in code of qdpc.cpp since can compile on friend's ubuntu (i'm working on mac) - wondering if there's wrong opencv? i've read online online might linker problem can't life of me figure problem out. version of opencv have 2.4.11, , version friend able compile 2.4.9.
all appreciated!
Comments
Post a Comment