Ask Your Question
0

Unresolved externals cv::flip cv::imshow

asked 2019-03-02 02:57:15 -0500

uncle_craper gravatar image

Can not set OpenCV in VS 2017. What do I do wrong?

CODE:

 #include "opencv2/highgui/highgui.hpp"

    using namespace cv;

    void main() {
    Mat src;
    VideoCapture cap;
    cap.open(0);

    while (true)
    {
        cap >> src;
        flip(src, src, 2);
        imshow("dd", src);

        waitKey(0);
    }}

LIBS I included:

  • opencv_highgui401.lib
  • opencv_core401.lib
  • opencv_videoio401.lib

LIB DEPENDEICES:

  • C:\OpenCV\OpneCV_bin\install\x64\vc15\bin
  • C:\OpenCV\OpneCV_bin\install\x64\vc15\lib

ADDITIONAL INCLUDE DIRS

  • C:\OpenCV\OpneCV_bin\install\include
  • C:\OpenCV\opencv\build\include

AND still I have errors:

unresolved external symbol "void __cdecl cv::flip(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &,int)"

unresolved external symbol "void __cdecl cv::imshow(class std::basic_string,class std::allocator const &,class cv::debug_build_guard::_InputArray const &)"

What am I missing?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-03-02 03:29:45 -0500

berak gravatar image

updated 2019-03-02 03:31:16 -0500

cv::debug_build_guard::XXXX -- it means, you're building a DEBUG project, and you have to link the DEBUG opencv libs, not the RELEASE ones you're using now, like:

  • opencv_highgui401d.lib
  • opencv_core401d.lib
  • opencv_videoio401d.lib

maybe (if you didn't, so far) you have to go back at the opencv.sln, and run everything again for DEBUG !

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-03-02 02:57:15 -0500

Seen: 1,449 times

Last updated: Mar 02 '19