xiaojin093 2023-11-15 21:36 采纳率: 53.3%
浏览 2

windows编译ffmpeg提示cl.exe命令未找到

ffmpeg6.01代码在windows编译,按下面步骤
1.安装了MSYS2及vs2022社区版,
2.参照网上说的打开MSYS2 MINGW64,执行了pacman -S mingw-w64-x86_64-toolchain和pacman -S base-devel,
3.接着进入ffmpeg源代码目录,执行 ./configure --prefix=./install --toolchain=msvc --arch=x86 --enable-shared --enable-gpl --enable-libx264 --enable-libx265 --enable-dxva2 --enable-cross-compile
提示错误如下:
Admin@DESKTOP-BR9VGL7 MINGW64 /d/bj/ffmpeg6
$ ./configure --prefix=./install --toolchain=msvc --arch=x86 --enable-shared --enable-gpl --enable-libx264 --enable-libx265 --enable-dxva2 --enable-cross-compile
cl.exe is unable to create an executable file.
C compiler test failed.

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.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

config.log中错误如下,

zRQbBq
WARNING: Unknown C compiler cl.exe, unable to select optimal CFLAGS
test_ld cc
test_cc
BEGIN ./ffconf.br6QZA64/test.c
    1    int main(void){ return 0; }
END ./ffconf.br6QZA64/test.c
cl.exe -c -o ./ffconf.br6QZA64/test.o ./ffconf.br6QZA64/test.c
./configure: line 995: cl.exe: command not found
C compiler test failed.

在环境变量path中添加cl.exe的路径"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64",还是报一样的错误,请问是什么原因,vs2022也重新安装过重启过电脑了

  • 写回答

1条回答 默认 最新

  • IT工程师_二师兄 2023-11-15 21:38
    关注

    你把报错复制到记事本发给我

    评论

报告相同问题?

问题事件

  • 创建了问题 11月15日

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大