2

我正在尝试编译alpha_encoder)(WebM Project的小实用程序,在webm-tools下)。我. _ _ _ c:\FFcompiler它花了一些时间,但我设法编译了ffmpeg,所以我决定使用它(我认为它会做)。这就是我到目前为止所做的。

首先,我将 webm-tools克隆到/cygdrive/c/FFcompiler/ffmpeg_local_builds/sandbox/win32/libvpx-1.4.0/third_party/. 有一个Makefile所以我试图运行make

$ cd /cygdrive/c/FFcompiler/ffmpeg_local_builds/sandbox/win32/libvpx-1.4.0/third_party/
$ git clone https://chromium.googlesource.com/webm/webm-tools.git
$ cd webm-tools/alpha_encoder/
$ make

但是g++抱怨mkvparser.hpp不存在。命令是

g++ -c -W -Wall -O3 -g -I../../libwebm alpha_encoder.cc -o alpha_encoder.o

在网上搜索后,似乎webm-tools依赖于libwebm,并期望找到它作为webm-tools的同级文件夹。所以...

$ cd ../..
$ git clone https://chromium.googlesource.com/webm/libwebm.git
$ cd libwebm

怎么办?README.libwebm告诉“使用 mingw-w64 为 Windows 交叉编译 libwebm”首先我必须cmake像这样运行cmake -DCMAKE_TOOLCHAIN_FILE=path/to/libwebm/build/mingw-w64_toolchain.cmake path/to/libwebm。就我而言:

cmake -DCMAKE_TOOLCHAIN_FILE=build/mingw-w64_toolchain.cmake .

并且cmake找不到i686-w64-mingw32-g++bin在谷歌搜索更多之后,解决这个问题的最简单方法似乎是添加mingw-w64-i686to PATH

$ export PATH=/cygdrive/c/FFcompiler/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin:$PATH

在此之后,现在cmake成功完成并创建一个Makefile,但因 make错误而停止:

/cygdrive/c/FFcompiler/ffmpeg_local_builds/sandbox/win32/libvpx-1.4.0/third_part
y/libwebm/common/file_util.cc:44:39: error: 'tmpnam_s' was not declared in this
scope
   errno_t err = tmpnam_s(tmp_file_name);
                                       ^

我已经搜索了该错误,但我被卡住了。我错过了什么?

4

0 回答 0