今天刚刚在ubuntu系统中将opencv配置好,然后测试了一个响应的打开图像的程序,为什么我用命令

“ g++ test.cpp -o test `pkg-config --libs --cflags opencv` "  能够顺利的编译通过,而用命令

“ g++ `pkg-config --libs --cflags opencv` -o test test.cpp " 的时候却显示如下问题:

test.cpp:(.text+0x1b): undefined reference to `cvLoadImage`

test.cpp:(.text+0x2e): undefined reference to `cvNamedWindow`

test.cpp:(.text+0x3f): undefined reference to `cvShowImage`

test.cpp:(.text+0x49): undefined reference to `cvWaitKey`

collect2: ld 返回1

哪位大侠能够帮我解决一下,小弟感激不尽。。。。

相关文章:

  • 2021-10-18
  • 2021-05-25
  • 2022-12-23
  • 2022-02-27
  • 2021-07-05
  • 2021-10-10
  • 2021-06-24
  • 2021-10-21
猜你喜欢
  • 2021-05-19
  • 2021-11-06
  • 2021-07-16
  • 2022-12-23
  • 2021-09-01
  • 2022-02-12
相关资源
相似解决方案