我正在尝试编译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-i686
to 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);
^
我已经搜索了该错误,但我被卡住了。我错过了什么?