Reputation: 2655
I want to include the libavcodec in my Qt-project. Should I do that with
#include <ffmpeg/libavcodec.h>
or with something more Qt, for example
QLibrary mylib("libavcodec");
And also a question to understand if I really got it: To use libavcodec, do I need to import the source-files or the .dll?
Upvotes: 0
Views: 3218
Reputation: 411
To compile Youre going to want to include
the FFMPEG header paths,
the FFMPEG library paths,
link against the avcodec.lib avformat.lib avdevice.lib avutil.lib files (or whatever your versions are called)
Then at runtime make sure the libraries avcodec.dll avformat.dll avdevice.dll avutil.dll (or whatever your versions are called) are in the same directory or the path.
Upvotes: 0
Reputation: 41306
You should use libavcodec like any other library. That is, include it's headers and link against it's import library. If you are using qmake
, you will need to modify the INCLUDEPATH
and LIBS
variables, see the documentation for some examples.
The QLibrary
option is only useful for DLLs that you want to load at run-time (e.g. plugins).
Upvotes: 3