运行 代码块中的 ffmpeg 示例 c 程序时无法识别文件格式

File format not recognized when run ffmpeg example c program in CodeBlocks

我是ffmpeg新手,目前正在测试ffmepg的encodingd/decoding功能。我在 Codeblocks 中打开 ffmeg/example/decoding_encoding.c 文件并链接了相关的库。但是在构建时,它给出了错误:

||=== Build: Debug in c_official_ffmepg (compiler: GNU GCC Compiler) ===|

ld cannot find ../../opencv-2.4.10/build/include: File format not recognized

||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

导致此错误的原因是什么?如何解决?

可能是因为 CodeBlocks 配置不当,您的问题似乎与此类似 post:

Right-click your header file,
select properties,
choose the Build tab,
and uncheck the "Compile file" and "Link file" options.

Do this for each header file. You should only ever use the Compile option on a header if you specifically want it to be used as a precompiled header, and you should never use the Link option for a header.