对createOpenGLCallback编译错误的未定义引用

undefined reference to createOpenGLCallback compilation error

本文关键字:未定义 引用 错误 createOpenGLCallback 编译      更新时间:2023-10-16

我在使用createOpenGLCallback时遇到编译问题。我收到以下错误消息:

undefined reference to `cv::createOpenGLCallback(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (*)(void*), void*)'

我不知道为什么使用其他opecv函数可以正常工作。我正在使用qmake来编译程序。下面是我的配置文件:

QT       += core gui 
        opengl
TARGET = surf
TEMPLATE = app

SOURCES += main.cpp
        mainwindow.cpp 
FrameBuffer.cpp 
robustmatcher.cpp
HEADERS  += mainwindow.h 
FrameBuffer.h 
imginfo.h 
robustmatcher.h
FORMS    += mainwindow.ui
CONFIG += link_pkgconfig
PKGCONFIG += opencv

我可以补充一点,我正在使用ubuntu 11.10 32位

有什么想法吗?

cv::createOpenGLCallback()在OpenCV的HighGUI模块中可用,前提是OpenCV是在支持Qt的情况下编译的,而您的情况似乎并非如此。