Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/130.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 将ffmpeg库与Qt框架一起使用会导致错误_C++_Linux_C++11_Ffmpeg_Qt4 - Fatal编程技术网

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