无法解析的外部cv :: flip cv :: imshow

时间:2019-03-02 08:52:16

标签: c++ opencv

无法在VS 2017中设置OpenCV。我该怎么办?是的,我把其他所有帖子都改成了红色。

代码:

    #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:

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

图书馆依赖性:

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

附加包含目录

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

仍然有错误:

  

无法解析的外部符号“ void __cdecl cv :: flip(class cv :: debug_build_guard :: _ InputArray const&,class cv :: debug_build_guard :: _ OutputArray const&,int)”

     

无法解析的外部符号“ void __cdecl cv :: imshow(class std :: basic_string,class std :: allocator const&,class cv :: debug_build_guard :: _ InputArray const&)”

我想念什么?

1 个答案:

答案 0 :(得分:1)

所以我不得不构建OpenCV库的调试版本。

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