test.cpp:(.text+0xc0): undefined reference to `cv::imread(std::string const&, int)'
test.cpp:(.text+0x11f): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'

This is a linker issue. Try:

g++ -o test_1 test_1.cpp ` pkg-config opencv --cflags --libs`

after compiling libraries from source, you need to do finally:

sudo ldconfig

相关文章:

  • 2021-11-06
  • 2022-01-12
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
  • 2021-04-30
  • 2022-02-24
猜你喜欢
  • 2022-12-23
  • 2022-03-02
  • 2021-09-23
  • 2021-09-19
  • 2021-09-14
  • 2021-09-03
  • 2021-04-23
相关资源
相似解决方案