未知操作系统'msys_nt-6.1'。在win7 64bit上使用Mingw

时间:2015-05-31 08:08:36

标签: ffmpeg mingw configure

我尝试使用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'. 

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

2 个答案:

答案 0 :(得分:0)

您应该使用Visual Studio对其进行编译,并且必须安装msys2和yasm。 将以下选项添加到./configure中:

-toolchain = msvc \     --arch = x86 \     --enable-yasm \     --enable-asm \     -启用共享\     --disable-static

检查此网站,他给出一些解释:

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

答案 1 :(得分:0)

如果您不遗漏任何东西,则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