The specific preparations before compilation will not be too long-winded, or the same mingw will be OK.
After downloading the FFMPEG source code and compiling it in mingw, the following error occurs: "libavformat/metadata. C: 133: 17: Error: Implicit declaration of function 'strcasecmp '",
(The strcasecmp statement is inaccurate .)
Two functions are implemented by yourself.
#ifndef __STRCASECMP_H____#define __STRCASECMP_H____static inline char __hack_charget( char c ){if(c >= 'a' && c <= 'z')c += 'A' - 'a';return c;}static inline int hack_strcasecmp( char const *a, char const *b ){char ac, bc;int r;for(;;) {ac = __hack_charget(*a++);bc = __hack_charget(*b++);r = (int)ac - (int)bc;if(r)return r;if(!ac)return 0;}}static inline int hack_strncasecmp( char const *a, char const *b, int n ){char ac, bc;int r, i;for(i = 0; i < n; ++i) {ac = __hack_charget(*a++);bc = __hack_charget(*b++);r = (int)ac - (int)bc;if(r)return r;if(!ac)return 0;}return 0;}#define strcasecmp hack_strcasecmp#define strncasecmp hack_strncasecmp#endif
Stored as strcasecmp. h In the mingw include directory.
Include this file in avstring. h and metadata. h. The problem is solved.
Original Author address: Click to open the link
Thank you very much!