ffmpeg missing config.h in libavutil (No Such File or Directory) CodeBlocks

余生颓废 提交于 2019-12-30 10:35:45

问题


When I test the ffmepg encoding/decoding exapmle c program in CodeBlocks, it shows:

/ffmpeg_sources/ffmpeg/libavutil/internal.h    fatal error: config.h: No such file or directory

error happens in many other header file within ffmpeg_source/libavutil folder. I searched the folder but did not find config.h file. There are config.h in other folders but does not work for the header files within libavutil folder.

I tried download newest ffmepg zip file and also cannot find the config.h file in it.

Where should I find the file?


回答1:


config.h file is a platform specific configuration file for the source. It is generated by the configure script provided in the software package (usually in the root directory of the decompressed tarball or whatever archive the source comes from). This script must be run before any build operation in order to have the source code configured to correspond to the environment.

Additionally I have to mention that "public" headers of a lib never include config.h, so you should never include a header of a lib into your code if it includes config.h.




回答2:


configure ffmpeg code before importing ide, then you will find config.h on root that defines platform specific variables considering your platform



来源:https://stackoverflow.com/questions/29143043/ffmpeg-missing-config-h-in-libavutil-no-such-file-or-directory-codeblocks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!