Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

Help with setting up OpenCV in QT on OSX

$
0
0
I’m new to QT and am having trouble setting up OpenCV for use with QT under OSX. Most of the information I’ve found on this pertains to Windows or Linux so I’m struggling. I’ve written an extensive post about what I have tried so far over at stackOverflow [stackoverflow.com] Rather than repost all that here, the gist is that I don’t seem to be linking to the OpenCV libs correctly. The console output is below. I’ve tried various ways of specifying the lib path & libs in the project profile. OpenCV is correctly installed for OSX – the headers are at /usr/local/include and the libs at /usr/local/libs. Does QT require something different? If more detail or specifics are needed, please let me know or check out my post at stackOverflow [stackoverflow.com] - Thanks! – one attempt at defining the lib paths. Tried it without periods, etc.  LIBS += -L/usr/local/lib \      -1ibopencv_core.2.4.6 \      -1ibopencv_imgproc.2.4.6 \      -1ibopencv_features2d.2.4.6 \      -1ibopencv_highgui.2.4.6 -Console output with error msg 02:44:38: Running steps for project RP_openCV_01... 02:44:38: Configuration unchanged, skipping qmake step. 02:44:38: Starting: "/usr/bin/make" clang++ -headerpad_max_install_names -mmacosx-version-min=10.6 -o RP_openCV_01 main.o   -L/usr/local/lib -1ibopencv_core.2.4.6,dylib -1ibopencv_imgproc.2.4.6.dylib -F/Users/rise/Qt5.0.2/5.0.2/clang_64/lib -framework QtCore clang: warning: argument unused during compilation: '-1ibopencv_core.2.4.6,dylib' clang: warning: argument unused during compilation: '-1ibopencv_imgproc.2.4.6.dylib' Undefined symbols for architecture x86_64:   "cv::_InputArray::_InputArray(cv::Mat const&)", referenced from:       _main in main.o   "cv::namedWindow(std::string const&, int)", referenced from:       _main in main.o   "cv::Mat::deallocate()", referenced from:       _main in main.o   "cv::imread(std::string const&, int)", referenced from:       _main in main.o   "cv::imshow(std::string const&, cv::_InputArray const&)", referenced from:       _main in main.o   "cv::waitKey(int)", referenced from:       _main in main.o   "cv::fastFree(void*)", referenced from:       _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [RP_openCV_01] Error 1 02:44:38: The process "/usr/bin/make" exited with code 2. Error while building/deploying project RP_openCV_01 (kit: Desktop Qt 5.0.2 clang 64bit) When executing step 'Make'

Viewing all articles
Browse latest Browse all 13965

Trending Articles