0

我已经在 Archlinux 上编译并安装了 QVision。我选择用 QVision 编译的库是 qwt、opencv 和 cgal。现在我想编译这段代码。但无法编译。

#include <QVApplication>
#include <QVVideoReaderBlock>
#include <QVImageCanvas>
#include <QVCannyEdgeDetector>
#include <QVDefaultGUI>

int main(int argc, char *argv[])
    {
    QVApplication app(argc, argv,
            "Example program for QVision library. Obtains Canny borders from input video frames."
            );

    QVVideoReaderBlock videoReader("Video reader");
    QVCannyEdgeDetector cannyBlock("Canny block");
    QVImageCanvas imageDisplayer("Original image");
    QVImageCanvas edgesDisplayer("Canny edges");

    videoReader.linkProperty(&cannyBlock,"Input image");
    cannyBlock.linkProperty("Input image",imageDisplayer);
    cannyBlock.linkProperty("Output image",edgesDisplayer);

    QVDefaultGUI defaultGUI;

    return app.exec();
}

这是我用于 qt 项目的 .pro 文件:

LIBS = -L /opt/QVision/lib/lib*
INCLUDEPATH = /opt/QVision/src
TARGET = canvasInteract
SOURCES +=  main.cpp

这些是我得到的错误:

main.cpp:-1: error: undefined reference to `QVCannyEdgeDetector::QVCannyEdgeDetector(QString)'
main.cpp:-1: error: undefined reference to `vtable for QVCannyEdgeDetector'
main.cpp:-1: error: undefined reference to `vtable for QVCannyEdgeDetector'
main.cpp:-1: error: undefined reference to `vtable for QVCannyEdgeDetector'
main.cpp:-1: error: undefined reference to `vtable for QVCannyEdgeDetector'
main.cpp:-1: error: more undefined reference to `vtable for QVCannyEdgeDetector'
:-1: error: collect2: error: ld returned 1 exit status

我怎么解决这个问题?

4

0 回答 0