gpt4 book ai didi

c++ - Unresolved external cv::flip cv::imshow

转载 作者:行者123 更新时间:2023-11-28 04:23:27 29 4
gpt4 key购买 nike

无法在 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

我仍然有错误:

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 &)"

我错过了什么?

最佳答案

所以我必须构建 OpenCV 库的调试版本。

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

关于c++ - Unresolved external cv::flip cv::imshow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54956778/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com