我在El Capitan 10.11.4上,我想安装Qt5来在Qt-Creator上创建和开发项目。我在here上下载了安装程序。我这样检查过: check list installation
现在我在Qt-Creator中打开了一个项目:
#include <QObject>
#include <QString>
#include <QTcpSocket>
#include <QStackedWidget>
#include <gst/gst.h>
#include <gst/video/videooverlay.h>
在qmake运行期间,它找不到'gst',它也无法从Qt中找到'QObject'或其他东西。
为了解决'gst'的问题,我试图将库路径包含到GStreamer Framework中,或者通过'PKG-CONFIG'来传递:
INCLUDEPATH += -I/Library/Frameworks/GStreamer.framework/Headers/
INCLUDEPATH += -I/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0/include
LIBS += -L/Library/Frameworks/GStreamer.framework/Libraries/
LIBS += -framework GStreamer
QMAKE_LFLAGS += -F/Library/Frameworks/GStreamer.framework/
PKG_CONFIG_PATH += /Library/Frameworks/GStreamer.framework/Libraries/pkgconfig:/usr/local/Cellar/glib/2.46.2/lib/pkgconfig
CONFIG += link_pkgconfig
PKGCONFIG += gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0
但没有任何作用! 非常感谢你的帮助:)
答案 0 :(得分:0)
我通过将GStreamer.framework的路径更改为:
来解决此问题your_qt_folder / version / clang_64 / lib
并将其添加到.pro文件
INCLUDEPATH += "/THE_NEW_PATH/GStreamer.framework/Headers/"
LIBS += -framework GStreamer