error: 'av_register_all' was not declared in this scope
-
i am using ffmpeg lib but get --main.cpp:25: error: 'av_register_all' was not declared in this scope
wt to do to avoid this.all ather thing r going we but ther is error in 'av_register_all' to register all files. -
At first, we need your code.
-
#include <QtGui/QApplication>
#include "mainwindow.h"
#include "ffmpeg.h"#include "iostream"
using namespace std;extern "C" {
#include "ffmpeg/libavcodec/avcodec.h"
#include "ffmpeg/libavformat/avformat.h"
}int main(int argc, char *argv[])
{QApplication a(argc, argv); MainWindow w; w.show(); av_register_all(); return a.exec();
}
-
I will wrap it for you;)
@
#include <QtGui/QApplication>
#include “mainwindow.h”
#include “ffmpeg.h”
#include “iostream”using namespace std;
extern “C” {
#include “ffmpeg/libavcodec/avcodec.h”
#include “ffmpeg/libavformat/avformat.h”
}int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
av_register_all();
return a.exec(); }
@ -
Problem in av_register_all().
"It's not declared in this scope" - it mean that you don't include file with defenition of av_register_all().
Maybe you should remove line #8 and #11 (in my wrapper).