## Need help on usage of libavcodec

For the developers that use FFmpeg in their software.
francesco
Posts: 10
Joined: Tue Dec 20, 2011 3:19 pm

### Need help on usage of libavcodec

Hi to all
I am new in ffmpeg usage. I download the code and compile it under windows using MSYS.
The question at now is : How can I use it ? When I type make it creates an exe file.
I need the library only. The only library I see is (for example) libavcodec.a but, as I know,
*.a extension is for linux libraries. I am attempting to use it with Borland C++ Builder.
There is a documentation regarding ? May be possible that there is a lot of documentation
and no one file that explain how to use it ? Why after compilation in the ffmpg installation
directory there isn't a file with *.lib extension ?
Where I can found documentation regarding ?
Best regards

DavidGallagher
Posts: 3
Joined: Tue Dec 20, 2011 2:41 am

### Re: Need help on usage of libavcodec

may not help if you want to use your own parameters for the build, but what I did was use,(from the "builds" section of this site), the dev and shared version, the dev version has the .libs and the shared has the .dll's of the latest build of ffmpeg.

and don't for get to wrap the headers in C like:(if useing VS C++)

Code: Select all

extern "C" {
#include <avformat.h>
#include <avcodec.h>
#include <swscale.h>
}

sorry if this isn't useful to you but it was alot simpler than building ffmpeg myself

zouhair
Posts: 3
Joined: Wed Jan 11, 2012 6:43 pm

### Re: Need help on usage of libavcodec

Hello,

I have all the lib from the dev and shared version.
I wrote a small program which call av_register_all() function in libavformat,
but when i compile I have an error:
undefined reference to 'av_register_all'
I use the command to get the error:
gcc encodec.exe -c encoder.c -L \Path\to\Lib -lavformat -lavutil

Do you think that there is something wrong with my lids or compiler (MinGW)?
Thanks

zouhair
Posts: 3
Joined: Wed Jan 11, 2012 6:43 pm

### Re: Need help on usage of libavcodec

I resolved the problem .
Actually I have a 64bit processor but I installed MinGW 32 bit .