Linking libraries to a QT project using pkg-config output

前端 未结 5 1305
太阳男子
太阳男子 2020-12-09 02:32

This is a bit of a newbie question. I am trying to add the OpenCV libraries to a QT project.

This question says the link flags are given by

pkg-confi         


        
5条回答
  •  悲&欢浪女
    2020-12-09 03:01

    Something like this in your qmake file should do

    LIBS += `pkg-config --libs opencv`
    

    Edit: Hmm, Ken Bloom's answer might be more portable, but erhm not documented?

提交回复
热议问题