尝试在 window10 上使用 cuda 11.1 编译 ffmpeg,但在运行 make -j 8 时出现错误

尝试在 window10 上使用 cuda 11.1 编译 ffmpeg,但在运行 make -j 8 时出现错误

我正在尝试在 Windows 上使用 cuda 11.1 编译 ffmpeg。我像这样运行 configure:

./configure --arch=x86_64 --target-os=mingw64 --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --enable-gpl --enable-libx264 --extra-cflags='-U__STRICT_ANSI__ ' --extra-cflags=-I../nv_sdk  --extra-ldflags=-L../nv_sdk --extra-cflags=-I/usr/local/include/

并且配置成功。

当我运行该命令时,make -j 8出现如下错误:

$ make -j 8
CC      libavdevice/alldevices.o
CC      libavdevice/avdevice.o
CC      libavdevice/dshow.o
CC      libavdevice/dshow_common.o
CC      libavdevice/dshow_crossbar.o
CC      libavdevice/dshow_enummediatypes.o
CC      libavdevice/dshow_enumpins.o
CC      libavdevice/dshow_filter.o
In file included from C:/msys64/usr/include/sys/config.h:5,
                 from C:/msys64/usr/include/_ansi.h:11,
                 from C:/msys64/usr/include/stdlib.h:11,
                 from ./libavutil/avassert.h:30,
                 from libavdevice/avdevice.c:19:
C:/msys64/usr/include/sys/features.h:322:5: warning: "_FORTIFY_SOURCE" is not defined, evaluates to 0 [-Wundef]
  322 | #if _FORTIFY_SOURCE > 0 && !defined(__cplusplus) && !defined(__lint__) && \
      |     ^~~~~~~~~~~~~~~
In file included from C:/msys64/usr/include/errno.h:9,
                 from ./libavutil/common.h:33,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/avassert.h:31,
                 from libavdevice/avdevice.c:19:
C:/msys64/usr/include/sys/errno.h:14: warning: "errno" redefined
   14 | #define errno (*__errno())
      |
In file included from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.3.0/include/stddef.h:1,
                 from C:/msys64/usr/include/stdlib.h:16,
                 from ./libavutil/avassert.h:30,
                 from libavdevice/avdevice.c:19:
C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:19: note: this is the location of the previous definition
   19 | #define errno (*_errno())
      |
In file included from C:/msys64/usr/include/sys/config.h:5,
                 from C:/msys64/usr/include/_ansi.h:11,
                 from C:/msys64/usr/include/sys/reent.h:13,
                 from C:/msys64/usr/include/sys/errno.h:11,
                 from C:/msys64/usr/include/errno.h:9,
                 from ./libavutil/common.h:33,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow.c:22:
C:/msys64/usr/include/sys/features.h:322:5: warning: "_FORTIFY_SOURCE" is not defined, evaluates to 0 [-Wundef]
  322 | #if _FORTIFY_SOURCE > 0 && !defined(__cplusplus) && !defined(__lint__) && \
      |     ^~~~~~~~~~~~~~~
In file included from ./libavutil/common.h:34,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/avassert.h:31,
                 from libavdevice/avdevice.c:19:
C:/msys64/usr/include/inttypes.h:28: warning: "__STRINGIFY" redefined
   28 | #define __STRINGIFY(a) #a
      |
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h:10,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h:10,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h:10,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:7,
                 from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.3.0/include/stddef.h:1,
                 from C:/msys64/usr/include/stdlib.h:16,
                 from ./libavutil/avassert.h:30,
                 from libavdevice/avdevice.c:19:
C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h:10: note: this is the location of the previous definition
   10 | #define __STRINGIFY(x) #x
      |
In file included from C:/msys64/usr/include/sys/config.h:5,
                 from C:/msys64/usr/include/_ansi.h:11,
                 from C:/msys64/usr/include/sys/types.h:20,
                 from C:/msys64/usr/include/pthread.h:11,
                 from ./libavutil/thread.h:30,
                 from libavdevice/alldevices.c:22:
C:/msys64/usr/include/sys/features.h:322:5: warning: "_FORTIFY_SOURCE" is not defined, evaluates to 0 [-Wundef]
  322 | #if _FORTIFY_SOURCE > 0 && !defined(__cplusplus) && !defined(__lint__) && \
      |     ^~~~~~~~~~~~~~~
In file included from ./libavutil/common.h:34,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/avassert.h:31,
                 from libavdevice/avdevice.c:19:
C:/msys64/usr/include/inttypes.h:262:5: warning: "__have_long64" is not defined, evaluates to 0 [-Wundef]
  262 | #if __have_long64
      |     ^~~~~~~~~~~~~
In file included from C:/msys64/usr/include/errno.h:9,
                 from ./libavutil/common.h:33,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow.c:22:
C:/msys64/usr/include/sys/errno.h:14: warning: "errno" redefined
   14 | #define errno (*__errno())
      |
In file included from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.3.0/include/stddef.h:1,
                 from C:/msys64/usr/include/sys/reent.h:14,
                 from C:/msys64/usr/include/sys/errno.h:11,
                 from C:/msys64/usr/include/errno.h:9,
                 from ./libavutil/common.h:33,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow.c:22:
C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:19: note: this is the location of the previous definition
   19 | #define errno (*_errno())
      |
In file included from ./libavutil/common.h:34,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow.c:22:
C:/msys64/usr/include/inttypes.h:28: warning: "__STRINGIFY" redefined
   28 | #define __STRINGIFY(a) #a
      |
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h:10,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h:9,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_stdarg.h:14,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/stdarg.h:140,
                 from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.3.0/include/stdarg.h:1,
                 from ./libavutil/log.h:24,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow.c:22:
C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h:10: note: this is the location of the previous definition
   10 | #define __STRINGIFY(x) #x
      |
In file included from ./libavutil/common.h:34,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow.c:22:
C:/msys64/usr/include/inttypes.h:262:5: warning: "__have_long64" is not defined, evaluates to 0 [-Wundef]
  262 | #if __have_long64
      |     ^~~~~~~~~~~~~
In file included from C:/msys64/usr/include/errno.h:9,
                 from ./libavcodec/avcodec.h:30,
                 from ./libavformat/internal.h:28,
                 from libavdevice/alldevices.c:23:
C:/msys64/usr/include/sys/errno.h:14: warning: "errno" redefined
   14 | #define errno (*__errno())
      |
In file included from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.3.0/include/stddef.h:1,
                 from C:/msys64/usr/include/sys/cdefs.h:47,
                 from C:/msys64/usr/include/sys/types.h:21,
                 from C:/msys64/usr/include/pthread.h:11,
                 from ./libavutil/thread.h:30,
                 from libavdevice/alldevices.c:22:
C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:19: note: this is the location of the previous definition
   19 | #define errno (*_errno())
      |
In file included from ./libavutil/common.h:34,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/internal.h:28,
                 from libavdevice/alldevices.c:23:
C:/msys64/usr/include/inttypes.h:28: warning: "__STRINGIFY" redefined
   28 | #define __STRINGIFY(a) #a
      |
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h:10,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h:10,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h:10,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:7,
                 from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.3.0/include/stddef.h:1,
                 from C:/msys64/usr/include/sys/cdefs.h:47,
                 from C:/msys64/usr/include/sys/types.h:21,
                 from C:/msys64/usr/include/pthread.h:11,
                 from ./libavutil/thread.h:30,
                 from libavdevice/alldevices.c:22:
C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h:10: note: this is the location of the previous definition
   10 | #define __STRINGIFY(x) #x
      |
In file included from ./libavutil/common.h:34,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/samplefmt.h:24,
                 from ./libavcodec/avcodec.h:31,
                 from ./libavformat/internal.h:28,
                 from libavdevice/alldevices.c:23:
C:/msys64/usr/include/inttypes.h:262:5: warning: "__have_long64" is not defined, evaluates to 0 [-Wundef]
  262 | #if __have_long64
      |     ^~~~~~~~~~~~~
In file included from C:/msys64/usr/include/sys/config.h:5,
                 from C:/msys64/usr/include/_ansi.h:11,
                 from C:/msys64/usr/include/sys/reent.h:13,
                 from C:/msys64/usr/include/sys/errno.h:11,
                 from C:/msys64/usr/include/errno.h:9,
                 from ./libavutil/common.h:33,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow_common.c:22:
C:/msys64/usr/include/sys/features.h:322:5: warning: "_FORTIFY_SOURCE" is not defined, evaluates to 0 [-Wundef]
  322 | #if _FORTIFY_SOURCE > 0 && !defined(__cplusplus) && !defined(__lint__) && \
      |     ^~~~~~~~~~~~~~~
In file included from C:/msys64/usr/include/errno.h:9,
                 from ./libavutil/common.h:33,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow_common.c:22:
C:/msys64/usr/include/sys/errno.h:14: warning: "errno" redefined
   14 | #define errno (*__errno())
      |
In file included from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.3.0/include/stddef.h:1,
                 from C:/msys64/usr/include/sys/reent.h:14,
                 from C:/msys64/usr/include/sys/errno.h:11,
                 from C:/msys64/usr/include/errno.h:9,
                 from ./libavutil/common.h:33,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow_common.c:22:
C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:19: note: this is the location of the previous definition
   19 | #define errno (*_errno())
      |
In file included from ./libavformat/os_support.h:36,
                 from ./libavformat/internal.h:31,
                 from libavdevice/alldevices.c:23:
C:/msys64/mingw64/x86_64-w64-mingw32/include/direct.h:65:15: error: conflicting types for 'mkdir'
   65 |   int __cdecl mkdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
      |               ^~~~~
In file included from ./libavformat/os_support.h:32,
                 from ./libavformat/internal.h:31,
                 from libavdevice/alldevices.c:23:
C:/msys64/usr/include/sys/stat.h:140:5: note: previous declaration of 'mkdir' was here
  140 | int mkdir (const char *_path, mode_t __mode );
      |     ^~~~~

C:/msys64/usr/include/sys/_default_fcntl.h:186:8: error: redefinition of 'struct flock'
  186 | struct flock {
      |        ^~~~~

C:/msys64/usr/include/machine/types.h:46:8: note: originally defined here
   46 | struct flock {
      |        ^~~~~

C:/msys64/usr/include/sys/features.h:322:5: warning: "_FORTIFY_SOURCE" is not defined, evaluates to 0 [-Wundef]
  322 | #if _FORTIFY_SOURCE > 0 && !defined(__cplusplus) && !defined(__lint__) && \
      |     ^~~~~~~~~~~~~~~

C:/msys64/usr/include/sys/features.h:322:5: warning: "_FORTIFY_SOURCE" is not defined, evaluates to 0 [-Wundef]
  322 | #if _FORTIFY_SOURCE > 0 && !defined(__cplusplus) && !defined(__lint__) && \
      |     ^~~~~~~~~~~~~~~

C:/msys64/usr/include/sys/errno.h:14: warning: "errno" redefined
   14 | #define errno (*__errno())
      |

C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:19: note: this is the location of the previous definition
   19 | #define errno (*_errno())
      |

C:/msys64/usr/include/inttypes.h:28: warning: "__STRINGIFY" redefined
   28 | #define __STRINGIFY(a) #a
      |

C:/msys64/usr/include/sys/errno.h:14: warning: "errno" redefined
   14 | #define errno (*__errno())
      |

C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:19: note: this is the location of the previous definition
   19 | #define errno (*_errno())
      |

C:/msys64/usr/include/inttypes.h:28: warning: "__STRINGIFY" redefined
   28 | #define __STRINGIFY(a) #a
      |

C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h:10: note: this is the location of the previous definition
   10 | #define __STRINGIFY(x) #x
      |

C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h:10: note: this is the location of the previous definition
   10 | #define __STRINGIFY(x) #x
      |

C:/msys64/usr/include/inttypes.h:262:5: warning: "__have_long64" is not defined, evaluates to 0 [-Wundef]
  262 | #if __have_long64
      |     ^~~~~~~~~~~~~

C:/msys64/usr/include/inttypes.h:262:5: warning: "__have_long64" is not defined, evaluates to 0 [-Wundef]
  262 | #if __have_long64
      |     ^~~~~~~~~~~~~

C:/msys64/usr/include/inttypes.h:28: warning: "__STRINGIFY" redefined
   28 | #define __STRINGIFY(a) #a
      |

C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h:10: note: this is the location of the previous definition
   10 | #define __STRINGIFY(x) #x
      |
In file included from ./libavutil/common.h:34,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow_enummediatypes.c:22:
C:/msys64/usr/include/inttypes.h:262:5: warning: "__have_long64" is not defined, evaluates to 0 [-Wundef]
  262 | #if __have_long64
      |     ^~~~~~~~~~~~~

                 from libavdevice/dshow_enumpins.c:22:
C:/msys64/usr/include/sys/features.h:322:5: warning: "_FORTIFY_SOURCE" is not defined, evaluates to 0 [-Wundef]
  322 | #if _FORTIFY_SOURCE > 0 && !defined(__cplusplus) && !defined(__lint__) && \
      |     ^~~~~~~~~~~~~~~

C:/msys64/usr/include/sys/features.h:322:5: warning: "_FORTIFY_SOURCE" is not defined, evaluates to 0 [-Wundef]
  322 | #if _FORTIFY_SOURCE > 0 && !defined(__cplusplus) && !defined(__lint__) && \
      |     ^~~~~~~~~~~~~~~

C:/msys64/usr/include/sys/errno.h:14: warning: "errno" redefined
   14 | #define errno (*__errno())
      |

C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:19: note: this is the location of the previous definition
   19 | #define errno (*_errno())
      |

C:/msys64/usr/include/sys/errno.h:14: warning: "errno" redefined
   14 | #define errno (*__errno())
      |

C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:19: note: this is the location of the previous definition
   19 | #define errno (*_errno())
      |

C:/msys64/usr/include/inttypes.h:28: warning: "__STRINGIFY" redefined
   28 | #define __STRINGIFY(a) #a
      |

C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h:10: note: this is the location of the previous definition
   10 | #define __STRINGIFY(x) #x
      |
In file included from ./libavutil/common.h:34,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow_enumpins.c:22:
C:/msys64/usr/include/inttypes.h:262:5: warning: "__have_long64" is not defined, evaluates to 0 [-Wundef]
  262 | #if __have_long64
      |     ^~~~~~~~~~~~~
In file included from ./libavutil/common.h:34,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow_filter.c:22:
C:/msys64/usr/include/inttypes.h:28: warning: "__STRINGIFY" redefined
   28 | #define __STRINGIFY(a) #a
      |

C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h:10: note: this is the location of the previous definition
   10 | #define __STRINGIFY(x) #x
      |

C:/msys64/usr/include/inttypes.h:262:5: warning: "__have_long64" is not defined, evaluates to 0 [-Wundef]
  262 | #if __have_long64
      |     ^~~~~~~~~~~~~
CC      libavdevice/dshow_pin.o

C:/msys64/usr/include/sys/features.h:322:5: warning: "_FORTIFY_SOURCE" is not defined, evaluates to 0 [-Wundef]
  322 | #if _FORTIFY_SOURCE > 0 && !defined(__cplusplus) && !defined(__lint__) && \
      |     ^~~~~~~~~~~~~~~

C:/msys64/usr/include/sys/errno.h:14: warning: "errno" redefined
   14 | #define errno (*__errno())
      |
C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:19: note: this is the location of the previous definition
   19 | #define errno (*_errno())
      |
In file included from ./libavutil/common.h:34,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow_pin.c:22:
C:/msys64/usr/include/inttypes.h:28: warning: "__STRINGIFY" redefined
   28 | #define __STRINGIFY(a) #a
      |

C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h:10: note: this is the location of the previous definition
   10 | #define __STRINGIFY(x) #x
      |

C:/msys64/usr/include/inttypes.h:262:5: warning: "__have_long64" is not defined, evaluates to 0 [-Wundef]
  262 | #if __have_long64
      |     ^~~~~~~~~~~~~
In file included from ./libavformat/internal.h:31,
                 from libavdevice/alldevices.c:23:
./libavformat/os_support.h: In function 'win32_unlink':
./libavformat/os_support.h:170:25: error: implicit declaration of function '_wunlink' [-Werror=implicit-function-declaration]
  170 | DEF_FS_FUNCTION(unlink, _wunlink, _unlink)
      |                         ^~~~~~~~
./libavformat/os_support.h:161:11: note: in definition of macro 'DEF_FS_FUNCTION'
  161 |     ret = wfunc(filename_w);                              \
      |           ^~~~~
./libavformat/os_support.h:170:35: error: implicit declaration of function '_unlink'; did you mean '_inline'? [-Werror=implicit-function-declaration]
  170 | DEF_FS_FUNCTION(unlink, _wunlink, _unlink)
      |                                   ^~~~~~~
./libavformat/os_support.h:167:12: note: in definition of macro 'DEF_FS_FUNCTION'
  167 |     return afunc(filename_utf8);                          \
      |            ^~~~~
./libavformat/os_support.h: In function 'win32_access':
./libavformat/os_support.h:194:26: error: implicit declaration of function '_waccess' [-Werror=implicit-function-declaration]
  194 | DEF_FS_FUNCTION2(access, _waccess, _access, int)
      |                          ^~~~~~~~
./libavformat/os_support.h:185:11: note: in definition of macro 'DEF_FS_FUNCTION2'
  185 |     ret = wfunc(filename_w, par);                         \
      |           ^~~~~
./libavformat/os_support.h:194:36: error: implicit declaration of function '_access' [-Werror=implicit-function-declaration]
  194 | DEF_FS_FUNCTION2(access, _waccess, _access, int)
      |                                    ^~~~~~~
./libavformat/os_support.h:191:12: note: in definition of macro 'DEF_FS_FUNCTION2'
  191 |     return afunc(filename_utf8, par);                     \
      |            ^~~~~
./libavformat/os_support.h: At top level:
./libavformat/os_support.h:52:16: warning: 'struct _stati64' declared inside parameter list will not be visible outside of this definition or declaration
   52 | #  define stat _stati64
      |                ^~~~~~~~
./libavformat/os_support.h:175:59: note: in definition of macro 'DEF_FS_FUNCTION2'
  175 | static inline int win32_##name(const char *filename_utf8, partype par) \
      |                                                           ^~~~~~~
./libavformat/os_support.h:195:52: note: in expansion of macro 'stat'
  195 | DEF_FS_FUNCTION2(stat, _wstati64, _stati64, struct stat*)
      |                                                    ^~~~
./libavformat/os_support.h: In function 'win32_stat':
./libavformat/os_support.h:195:24: error: implicit declaration of function '_wstati64' [-Werror=implicit-function-declaration]
  195 | DEF_FS_FUNCTION2(stat, _wstati64, _stati64, struct stat*)
      |                        ^~~~~~~~~
./libavformat/os_support.h:185:11: note: in definition of macro 'DEF_FS_FUNCTION2'
  185 |     ret = wfunc(filename_w, par);                         \
      |           ^~~~~
./libavformat/os_support.h:195:35: error: implicit declaration of function '_stati64' [-Werror=implicit-function-declaration]
  195 | DEF_FS_FUNCTION2(stat, _wstati64, _stati64, struct stat*)
      |                                   ^~~~~~~~
./libavformat/os_support.h:191:12: note: in definition of macro 'DEF_FS_FUNCTION2'
  191 |     return afunc(filename_utf8, par);                     \
      |            ^~~~~
cc1.exe: some warnings being treated as errors
In file included from ./libavformat/os_support.h:36,
                 from ./libavformat/internal.h:31,
                 from libavdevice/dshow.c:26:
C:/msys64/mingw64/x86_64-w64-mingw32/include/direct.h:65:15: error: conflicting types for 'mkdir'
   65 |   int __cdecl mkdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
      |               ^~~~~
In file included from ./libavformat/os_support.h:32,
                 from ./libavformat/internal.h:31,
                 from libavdevice/dshow.c:26:
C:/msys64/usr/include/sys/stat.h:140:5: note: previous declaration of 'mkdir' was here
  140 | int mkdir (const char *_path, mode_t __mode );
      |     ^~~~~
In file included from C:/msys64/usr/include/sys/fcntl.h:3,
                 from C:/msys64/usr/include/fcntl.h:12,
                 from ./libavformat/os_support.h:44,
                 from ./libavformat/internal.h:31,
                 from libavdevice/dshow.c:26:
C:/msys64/usr/include/sys/_default_fcntl.h:186:8: error: redefinition of 'struct flock'
  186 | struct flock {
      |        ^~~~~
In file included from C:/msys64/usr/include/sys/types.h:224,
                 from C:/msys64/usr/include/stdio.h:61,
                 from ./libavutil/common.h:38,
                 from ./libavutil/avutil.h:296,
                 from ./libavutil/log.h:25,
                 from libavdevice/avdevice.h:48,
                 from libavdevice/dshow_capture.h:27,
                 from libavdevice/dshow.c:22:
C:/msys64/usr/include/machine/types.h:46:8: note: originally defined here
   46 | struct flock {
      |        ^~~~~
In file included from ./libavformat/internal.h:31,
                 from libavdevice/dshow.c:26:
./libavformat/os_support.h: In function 'win32_unlink':
./libavformat/os_support.h:170:25: error: implicit declaration of function '_wunlink' [-Werror=implicit-function-declaration]
  170 | DEF_FS_FUNCTION(unlink, _wunlink, _unlink)
      |                         ^~~~~~~~
./libavformat/os_support.h:161:11: note: in definition of macro 'DEF_FS_FUNCTION'
  161 |     ret = wfunc(filename_w); 
      |           ^~~~~
./libavformat/os_support.h:170:35: error: implicit declaration of function '_unlink'; did you mean '_inline'? [-Werror=implicit-function-declaration]
  170 | DEF_FS_FUNCTION(unlink, _wunlink, _unlink)
      |                                   ^~~~~~~
./libavformat/os_support.h:167:12: note: in definition of macro 'DEF_FS_FUNCTION'
  167 |     return afunc(filename_utf8);
      |            ^~~~~
./libavformat/os_support.h: In function 'win32_access':
./libavformat/os_support.h:194:26: error: implicit declaration of function '_waccess' [-Werror=implicit-function-declaration]
  194 | DEF_FS_FUNCTION2(access, _waccess, _access, int)
      |                          ^~~~~~~~
./libavformat/os_support.h:185:11: note: in definition of macro 'DEF_FS_FUNCTION2'
  185 |     ret = wfunc(filename_w, par);                         \
      |           ^~~~~
./libavformat/os_support.h:194:36: error: implicit declaration of function '_access' [-Werror=implicit-function-declaration]
  194 | DEF_FS_FUNCTION2(access, _waccess, _access, int)
      |                                    ^~~~~~~
./libavformat/os_support.h:191:12: note: in definition of macro 'DEF_FS_FUNCTION2'
  191 |     return afunc(filename_utf8, par);                     \
      |            ^~~~~
./libavformat/os_support.h: At top level:
./libavformat/os_support.h:52:16: warning: 'struct _stati64' declared inside parameter list will not be visible outside of this definition or declaration
   52 | #  define stat _stati64
      |                ^~~~~~~~
./libavformat/os_support.h:175:59: note: in definition of macro 'DEF_FS_FUNCTION2'
  175 | static inline int win32_##name(const char *filename_utf8, partype par) \
      |                                                           ^~~~~~~
./libavformat/os_support.h:195:52: note: in expansion of macro 'stat'
  195 | DEF_FS_FUNCTION2(stat, _wstati64, _stati64, struct stat*)
      |                                                    ^~~~
./libavformat/os_support.h: In function 'win32_stat':
./libavformat/os_support.h:195:24: error: implicit declaration of function '_wstati64' [-Werror=implicit-function-declaration]
  195 | DEF_FS_FUNCTION2(stat, _wstati64, _stati64, struct stat*)
      |                        ^~~~~~~~~
./libavformat/os_support.h:185:11: note: in definition of macro 'DEF_FS_FUNCTION2'
  185 |     ret = wfunc(filename_w, par);                         \
      |           ^~~~~
./libavformat/os_support.h:195:35: error: implicit declaration of function '_stati64' [-Werror=implicit-function-declaration]
  195 | DEF_FS_FUNCTION2(stat, _wstati64, _stati64, struct stat*)
      |                                   ^~~~~~~~
./libavformat/os_support.h:191:12: note: in definition of macro 'DEF_FS_FUNCTION2'
  191 |     return afunc(filename_utf8, par);                     \
      |            ^~~~~
cc1.exe: some warnings being treated as errors
make: *** [ffbuild/common.mak:70: libavdevice/dshow.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [ffbuild/common.mak:70: libavdevice/alldevices.o] Error 1
libavdevice/dshow_filter.c: In function 'ff_dshow_filter_FindPin':
libavdevice/dshow_filter.c:109:10: error: implicit declaration of function 'wcscmp' [-Werror=implicit-function-declaration]
  109 |     if (!wcscmp(id, L"In")) {
      |          ^~~~~~
libavdevice/dshow_filter.c: In function 'ff_dshow_filter_JoinFilterGraph':
libavdevice/dshow_filter.c:138:9: error: implicit declaration of function 'wcscpy' [-Werror=implicit-function-declaration]
  138 |         wcscpy(this->info.achName, name);
      |         ^~~~~~
cc1.exe: some warnings being treated as errors
make: *** [ffbuild/common.mak:70: libavdevice/dshow_filter.o] Error 1
libavdevice/dshow_pin.c: In function 'ff_dshow_pin_QueryPinInfo':
libavdevice/dshow_pin.c:114:5: error: implicit declaration of function 'wcscpy' [-Werror=implicit-function-declaration]
  114 |     wcscpy(info->achName, L"Capture");
      |     ^~~~~~
libavdevice/dshow_pin.c: In function 'ff_dshow_pin_QueryId':
libavdevice/dshow_pin.c:133:11: error: implicit declaration of function 'wcsdup' [-Werror=implicit-function-declaration]
  133 |     *id = wcsdup(L"libAV Pin");
      |           ^~~~~~
libavdevice/dshow_pin.c:133:9: warning: assignment to 'wchar_t *' {aka 'short unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
  133 |     *id = wcsdup(L"libAV Pin");
      |         ^
cc1.exe: some warnings being treated as errors
make: *** [ffbuild/common.mak:70: libavdevice/dshow_pin.o] Error 1

答案1

代表CUDA 8。因此8make -j 8如果您使用的是 CUDA 11,则命令将是make -j 11

相关内容