【问题标题】:Unknown OS 'msys_nt-6.1'. using Mingw on win7 64bit未知操作系统“msys_nt-6.1”。在 win7 64 位上使用 Mingw
【发布时间】:2015-08-13 20:00:15
【问题描述】:

我尝试使用 MSYS2 和 MIngW 从源代码编译 FFmpeg 我使用的是 win7 64 位。 使用。

$ ./configure --enable-shared

我收到此错误:

Unknown OS 'msys_nt-6.1'.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.

查看 config.log 我看到了(日志的结尾):

gcc -std=c99 -Wall -O3 -c -o /tmp/ffconf.fnJeLuIu.o /tmp/ffconf.e8DJYGJM.c
check_code cc  int test[2*(sizeof(void *) > 4) - 1]
check_cc
BEGIN /tmp/ffconf.e8DJYGJM.c
    1   int main(void) { int test[2*(sizeof(void *) > 4) - 1]; return 0; }
END /tmp/ffconf.e8DJYGJM.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -c -o /tmp/ffconf.fnJeLuIu.o /tmp/ffconf.e8DJYGJM.c
G:/msys64/tmp/ffconf.e8DJYGJM.c: In function 'main':
G:/msys64/tmp/ffconf.e8DJYGJM.c:1:22: error: size of array 'test' is negative
 int main(void) { int test[2*(sizeof(void *) > 4) - 1]; return 0; }
                      ^
check_cpp_condition stddef.h defined(__x86_64__)
check_cpp
BEGIN /tmp/ffconf.e8DJYGJM.c
    1   #include <stddef.h>
    2   #if !(defined(__x86_64__))
    3   #error "unsatisfied condition: defined(__x86_64__)"
    4   #endif
END /tmp/ffconf.e8DJYGJM.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -E -o /tmp/ffconf.fnJeLuIu.o /tmp/ffconf.e8DJYGJM.c
G:/msys64/tmp/ffconf.e8DJYGJM.c:3:2: error: #error "unsatisfied condition: defined(__x86_64__)"
 #error "unsatisfied condition: defined(__x86_64__)"
  ^
Unknown OS 'msys_nt-6.1'. 

我错过了什么?我做错了什么 ? 谢谢

【问题讨论】:

  • 暂时解决:使用 msys 或 cygwin 交叉编译:|

标签: ffmpeg mingw configure


【解决方案1】:

你应该用visual studio编译它,你必须安装msys2和yasm.. 将以下选项添加到 ./configure :

--工具链=msvc \ --arch=x86\ --启用-yasm \ --启用-asm\ --启用共享\ --disable-static

查看这个网站,他给出了一些解释:

https://pracucci.com/compile-ffmpeg-on-windows-with-visual-studio-compiler.html

【讨论】:

    【解决方案2】:

    如果你没有遗漏任何东西,ffmpeg 应该使用./configure --enable-shared --target-os=mingw32 --arch=x86_64 构建良好。

    在这里查看 MSYS2 如何构建 ffmpeg:https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-ffmpeg/PKGBUILD#L61

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-14
      • 1970-01-01
      • 1970-01-01
      • 2013-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多