C++ 将ffmpeg库与Qt框架一起使用会导致错误
当我包括:C++ 将ffmpeg库与Qt框架一起使用会导致错误,c++,linux,c++11,ffmpeg,qt4,C++,Linux,C++11,Ffmpeg,Qt4,当我包括: extern "C" { #include <libavcodec/avcodec.h> } extern“C”{ #包括 } 我得到一个错误: 对QVideoSurfaceFormat::QVideoSurfaceFormat(QSize)的未定义引用 常量和,QVideoFrame::AVPixelFormat,QAbstractVideoBuffer::HandletType) 没有包含构建成功 我猜包含的一些定义打破了QVideoSurfaceFormat防御
extern "C" {
#include <libavcodec/avcodec.h>
}
extern“C”{
#包括
}
我得到一个错误:
对QVideoSurfaceFormat::QVideoSurfaceFormat(QSize)的未定义引用
常量和,QVideoFrame::AVPixelFormat,QAbstractVideoBuffer::HandletType)
没有包含构建成功
我猜包含的一些定义打破了QVideoSurfaceFormat防御。有人遇到过类似的问题吗
#define __STDC_CONSTANT_MACROS // to fix #include <stdint.h> issue
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
}
#define __STDC_CONSTANT_MACROS