【问题标题】:Connect ffmpeg to Visual Studio 2008将 ffmpeg 连接到 Visual Studio 2008
【发布时间】:2013-06-20 16:28:32
【问题描述】:

我尝试将 ffmpeg 连接到 Visual c++,例如 this,但是当我输入“./configure --toolchain=msvc”时出现此错误:

c99wrap cl 无法创建可执行文件。

如果 c99wrap cl 是交叉编译器,请使用 --enable-cross-compile 选项。仅当您知道交叉编译的含义时才这样做。

C 编译器测试失败

config.log:

警告:找不到 pkg-config,库检测可能会失败。 mktemp -u XXXXXX ./configure: line 728: mktemp: command not found 警告: 未知 C 编译器 C:\c99\c99wrap cl,无法选择最优 CFLAGS check_ld cc check_cc BEGIN /tmp/ffconf..ZHENYA.500.5884.c 1 int main(void){ return 0; } END /tmp/ffconf..ZHENYA.500.5884.c C:\c99\c99wrap cl -c -o /tmp/ffconf..ZHENYA.500.5884.o /tmp/ffconf..ZHENYA.500.5884.c 致命错误 C1510: 无法加载语言 资源 clui.dll。 C 编译器测试失败。

有什么问题? 或者只是将您编译后获得的文件发送给我(我不会问,但我会修复这两个月)

./configure --toolchain=msvc

制作

进行安装


更改后记录:

   WARNING: pkg-config not found, library detection may fail.
mktemp -u XXXXXX
Uxplas
check_ld cc
check_cc
BEGIN /tmp/ffconf.WcAVdgRZ.c
    1   int main(void){ return 0; }
END /tmp/ffconf.WcAVdgRZ.c
c99wrap cl -nologo -D_USE_MATH_DEFINES -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64 -c -Fo /tmp/ffconf.jQtxnkfv.o /tmp/ffconf.WcAVdgRZ.c
ffconf.WcAVdgRZ.c
ffconf.jQtxnkfv.o_converted.c
c99wrap link -o /tmp/ffconf.sPZUPuMJ.exe /tmp/ffconf.jQtxnkfv.o
link: invalid option -- o
Try `link --help' for more information.
C compiler test failed.

从第二台计算机登录:

WARNING: pkg-config not found, library detection may fail.
mktemp -u XXXXXX
./configure: line 749: mktemp: command not found
WARNING: Unknown C compiler c99wrap cl, unable to select optimal CFLAGS
check_ld cc
check_cc
BEGIN /tmp/ffconf..zhenya.500.4036.c
END /tmp/ffconf..zhenya.500.4036.c
c99wrap cl -I/local/include -c -o /tmp/ffconf..zhenya.500.4036.o /tmp/ffconf..zhenya.500.4036.c
./configure: line 749: c99wrap: command not found
C compiler test failed.

错误:

1>ConsoleApplication1.obj : error LNK2028: ёё√ыър эр эхЁрчЁх°хээє■ ыхъёхьє (0A000039) "void __cdecl av_register_all(void)" (?av_register_all@@$$FYAXXZ) т ЇєэъЎшш "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
1>ConsoleApplication1.obj : error LNK2019: ёё√ыър эр эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы "void __cdecl av_register_all(void)" (?av_register_all@@$$FYAXXZ) т ЇєэъЎшш "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
1>c:\users\Zhenya\documents\visual studio 2012\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe : fatal error LNK1120: эхЁрчЁх°хээ√ї тэх°эшї ¤ыхьхэЄют: 2

【问题讨论】:

  • @moskito-x 很抱歉让您久等了。我下载了mktemp-1.6-2,但是没有找到mktemp.exe。之后,我尝试使用 msys 编译文件(在文件夹 mktemp-1.6 中),但出现很多错误。在哪里可以找到 mktemp.exe?谢谢!
  • 这是他名字中带有'bin'的下载。 mktemp-1.6-2-msys-1.0.13-bin.tar.lzma/download.
  • 我不确定驱动器号 A: 是否是安装 Visual Studio 的好选择。但是让我们尝试遵循 Path-environment-value。 C:\msys\1.0\bin;"A:\Visual Studio 2008\VC\bin";"A:\Visual Studio 2012\VC\bin"; .... 。不要将" 放在开头和结尾。仅用空格引用路径。
  • @moskito-x 哦,我的上帝...我认为这是进步...我将视觉工作室的路径放在引号中并(1)运行“./configure --toolchain=msvc”而没有错误(!)(但我收到警告:找不到 pkg-config,库检测可能会失败)。 2) 之后我运行“make”并收到许多警告(许多 c4005、c4133、c4054、c4090、c4245、c4701、c4189),致命错误 LNK1181(关于“libavfilter/x86volume.o”)和“[libavfilter/libavfilter .a] 错误 157"。
  • 你没有安装 perl.exe !!!并将 c:\mingw\bin 放在 c:\msys\1.0\bin 之后。安装Active Perl

标签: visual-studio-2008 compilation ffmpeg mingw


【解决方案1】:

错误mktemp: command not found

下载:mktemp-1.6-2

mktemp.exe 放入您的msys\1.0\bin 中。


查看你的 ffmpeg 文件夹是否存在?

  • inttypes.h
  • stdint.h
  • vsyasm.targets
  • vsyasm.txt
  • vsyasm.xml
  • 复制 vsyasm.txt , vsyasm.xml , vsyasm.exe
  • yasm.txt、yasm.xml、yasm.exe

查看您的... \VisualStudio??\VC\bin 文件夹是否存在?

  • vsyasm.targets
  • vsyasm.txt
  • vsyasm.xml
  • vsyasm.exe
  • 复制 vsyasm.txt , vsyasm.xml , vsyasm.exe
  • yasm.txt、yasm.xml、yasm.exe

所以你同时拥有 vsyasm 和 yasm !


如果在您的config.log 中,最后一行类似于c99wrap cl ... bad file number

你应该下载另一个c99-to-c89

get it from here

搜索以前安装的文件并删除它们。

c99wrap.exe
c99conv.exe
makedef

将新文件复制到 Visual Studio bin 文件夹。

现在./configure --toolchain=msvc 应该可以正常运行了。

注意:
make 问题:
告诉我你用 make 走了多远。我确定您会收到 gawk : unterminated string 错误。

【讨论】:

  • @user2274492 寻找:c:\msys\1.0\bin\mktemp.exe。你能找到mktemp.exe 文件吗?
  • @user2274492 : 下载mktemp-1.6-2并放入msys\1.0\bin
【解决方案2】:

要构建(c99wrap.exe 或 FFmpeg/Libav 本身),请确保 您没有使用 msys 链接器,而是使用 MSVS 链接器。为了 现在,暂时备份 /usr/bin/link 到某个地方,这样它就不会在你的 $PATH。

来源https://blogs.gnome.org/rbultje/2012/09/27/microsoft-visual-studio-support-in-ffmpeg-and-libav/comment-page-1/#comment-367

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-18
    • 2011-10-18
    • 2014-04-25
    • 2012-02-23
    相关资源
    最近更新 更多