目前,我正在一个研究项目中,以寻找最佳的库来处理RTSP流。我正在努力寻找如何链接Live555库的方法。.我已经使用.mak文件构建了该库,但是我没有包括Qt KDE上的工作。.如果有人在集成该库方面有经验,请指向右侧方向。
这是我的.pro文件:

.pro

TEMPLATE = app

QT += qml quick widgets

SOURCES += main.cpp \
    rtsp.cpp

RESOURCES += qml.qrc

LIVE555_LIBRARY_PATH = C:/live555/live

INCLUDEPATH +=
C:/live555/live/BasicUsageEnvironment/include
C:/live555/live/groupsock/include
C:/live555/live/liveMedia/include
C:/live555/live/UsageEnvironment/include

LIBS +=
C:/live555/live/BasicUsageEnvironment/libBasicUsageEnvironment.lib
C:/live555/live/groupsock/libgroupsock.lib
C:/live555/live/liveMedia/libliveMedia.lib
C:/live555/live/UsageEnvironment/libUsageEnvironment.lib

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =

# Default rules for deployment.
include(deployment.pri)

HEADERS += \
    rtsp.h

这是我得到的错误
Live555QML\rtsp.h:3: error: C1083:
Cannot open include file: 'liveMedia/include/AC3AudioRTPSink.hh': No such file or directory

最佳答案

路径段liveMedia/include似乎在rtsp.hINCLUDEPATH中重复。编译器正在寻找以下路径:

C:/live555/live/BasicUsageEnvironment/include/liveMedia/include/AC3AudioRTPSink.hh
C:/live555/live/groupsock/include/liveMedia/include/AC3AudioRTPSink.hh
C:/live555/live/liveMedia/include/liveMedia/include/AC3AudioRTPSink.hh
C:/live555/live/UsageEnvironment/include/liveMedia/include/AC3AudioRTPSink.hh

尝试将文件夹C:/live555/live添加到INCLUDEPATH。如果可以,并且您到处都使用完整路径,则应删除当前的INCLUDEPATH内容。

关于c++ - 链接Live555库-Qt,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33632275/

10-09 08:45