首页 > 代码库 > Using ffmpeg libraries in Code::Blocks

Using ffmpeg libraries in Code::Blocks

I am digging into a project that needs to use some open source video codec library. ffmpeg is very powerful video codec library, which I decided to use in my project. I compiled and installed the ffmpeg library, then the problem comes, how to use the library in my project conviniently. My first thought is to write make file. I am not an expert in makefile things, so I changed to try to use Code::Blocks IDE, which is very easy to use. After configuring the include path and adding all the ffmpeg static library files, I still can‘t build the project successfully.

After checking the makefiles of examples, which are included in the ffmpeg package, I get the command lines of compiling and linking these examples. The problem is obvious, some system libraries is missed, and -pthread parameter should be included in linking. Below is the setting screen of Code::Blocks, wish it could help other guys a little.

技术分享

 

技术分享

 

Using ffmpeg libraries in Code::Blocks