tags:

views:

13

answers:

0

Hi,

Firstival, I am not familiar with how to add such a library in Eclipse IDE for C/C++ project.

I have downloaded the lasted ffmpeg library from: http://www.ffmpeg.org/download.html

and have done several steps:

  1. Includes: libavcodec + libavformat + ffmpeg (parent directory)
  2. Libraries: avcodec + avutil + avfilter + avdevice

Then I write this sample:

#include <iostream>
using namespace std;

extern "C"
{
 #include "libavcodec/avcodec.h"
 #include "libavformat/avformat.h"
}

int main () {

 cout << "Hello there";

 return 0;
}

When building the project, I got the error messages following:

In file included from ../src/main.cpp:12: D:/EclipseWS/ffmpeg-0.5.3/libavcodec/avcodec.h:30:30: error: libavutil/avutil.h: No such file or directory In file included from ../src/main.cpp:13: D:/EclipseWS/ffmpeg-0.5.3/libavformat/avformat.h:45:32: error: libavcodec/avcodec.h: No such file or directory In file included from D:/EclipseWS/ffmpeg-0.5.3/libavformat/avformat.h:47, from ../src/main.cpp:13: D:/EclipseWS/ffmpeg-0.5.3/libavformat/avio.h:33:30: error: libavutil/common.h: No such file or directory In file included from ../src/main.cpp:13: D:/EclipseWS/ffmpeg-0.5.3/libavformat/avformat.h:260:5: error: missing binary operator before token "(" D:/EclipseWS/ffmpeg-0.5.3/libavformat/avformat.h:478:5: error: missing binary operator before token "(" D:/EclipseWS/ffmpeg-0.5.3/libavformat/avformat.h:497:5: error: missing binary operator before token "("

Could anyone has experienced about this, please give me an advice?

Thanks in advance!