I have tried everything in the book and EVERYTHING I could find on how to do this and reinstalled and reconfigured and rebuilt several times to no avail. This is what I have. I’ve made FFMPEG on my Ubuntu VM and have the following code written:
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include <stdio.h>
#include <iostream>
using namespace std;
int main( int argc, char* argv[] ) {
avcodec_register_all();
return 0;
}
This errors and says:
/home/adam/workspace/MP4 Tools/Debug/../testDriver.cpp:19: undefined reference to `avcodec_register_all()'
collect2: ld returned 1 exit status
I have included the libavcodec.a file. Project->Properties->GCC C++ Linker->Libraries->add “avcodec”
Can anyone think of something I’m not doing or overlooking? Thanks so much.
I posted a solution here
but don’t forget that if you use c++ you should include ffmpeg headers in this way: