在Windows环境下编译VPX

2021-03-20 13:29:35 浏览数 (1)

首先到CygWin的官网下载CygWin的安装包,编译环境需在此环境下进行,https://cygwin.com/install.html,安装的过程中,记得一定要安装perl,make,wget,apt-cyg这些命令,不然后面会很麻烦

安装apt-cyg

可以直接将这个脚本拷贝到系统中,然后运行即可。

然后在CygWin环境下,切换到libvpx的目录下,运行configure

代码语言:javascript复制
./configure  --target=x86-win32-vs12 --enable-static-msvcrt --disable-install-docs

想不生成文档的话,最后的 --disable-install-docs 可以去掉

运行的结果如下

代码语言:javascript复制
$ ../libvpx-master/configure --target=x86-win32-vs16 --enable-static-msvcrt
  enabling static_msvcrt
  enabling vp8_encoder
  enabling vp8_decoder
  enabling vp9_encoder
  enabling vp9_decoder
Configuring for target 'x86-win32-vs16'
  enabling x86
  enabling runtime_cpu_detect
  enabling mmx
  enabling sse
  enabling sse2
  enabling sse3
  enabling ssse3
  enabling sse4_1
  enabling avx
  enabling avx2
  enabling avx512
    disabling avx512: not supported by compiler
  using yasm
  disabling ccache
  enabling postproc
  enabling unit_tests
  enabling webm_io
  enabling libyuv
Bypassing toolchain for environment detection.
Creating makefiles for x86-win32-vs16 libs
Creating makefiles for x86-win32-vs16 examples
Creating makefiles for x86-win32-vs16 tools
Creating makefiles for x86-win32-vs16 docs
Creating makefiles for x86-win32-vs16 solution

运行完成后会生成makefile,接下来用make命令就可以生成解决方案

运行的内容如下

代码语言:javascript复制
starxiang@VastaiTech:/mnt/d/Workspace/vp9$ make
    [CREATE] vpx.def
    [CREATE] vpx_config.asm
    [CREATE] vpx_scale_rtcd.h
    [CREATE] vpx_dsp_rtcd.h
    [CREATE] vp8_rtcd.h
    [CREATE] vp9_rtcd.h
    [CREATE] vpx.vcxproj
generating filter 'Source Files' from 465 files
generating filter 'Header Files' from 227 files
generating filter 'Build Files' from 20 files
generating filter 'References' from 7 files
Ignored files list (7 items) is:
    ../libvpx-master/vpx_dsp/vpx_dsp_rtcd_defs.pl
    ../libvpx-master/CHANGELOG
    ../libvpx-master/vpx_scale/vpx_scale_rtcd.pl
    ../libvpx-master/vp8/common/rtcd_defs.pl
    ../libvpx-master/vp9/common/vp9_rtcd_defs.pl
    ../libvpx-master/build/make/version.sh
    ../libvpx-master/build/make/rtcd.pl
    [CREATE] vp9rc.vcxproj
generating filter 'Source Files' from 150 files
generating filter 'Header Files' from 78 files
generating filter 'Build Files' from 3 files
generating filter 'References' from 1 files
Ignored files list (1 items) is:
    ../libvpx-master/vp9/common/vp9_rtcd_defs.pl
    [CREATE] gtest.vcxproj
generating filter 'Source Files' from 1 files
generating filter 'Header Files' from 0 files
generating filter 'Build Files' from 0 files
generating filter 'References' from 0 files
Ignored files list (0 items) is:
    [CREATE] test_libvpx.vcxproj
generating filter 'Source Files' from 122 files
generating filter 'Header Files' from 32 files
generating filter 'Build Files' from 4 files
generating filter 'References' from 2 files
Ignored files list (0 items) is:
    [CREATE] test_intra_pred_speed.vcxproj
generating filter 'Source Files' from 5 files
generating filter 'Header Files' from 3 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 2 files
Ignored files list (0 items) is:
    [CREATE] test_rc_interface.vcxproj
generating filter 'Source Files' from 4 files
generating filter 'Header Files' from 3 files
generating filter 'Build Files' from 3 files
generating filter 'References' from 3 files
Ignored files list (0 items) is:
make[1]: Warning: File '.projects' has modification time 0.086 s in the future
    [vcproj] vpxdec.vcxproj
generating filter 'Source Files' from 64 files
generating filter 'Header Files' from 33 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] vpxenc.vcxproj
generating filter 'Source Files' from 67 files
generating filter 'Header Files' from 34 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] vp9_spatial_svc_encoder.vcxproj
generating filter 'Source Files' from 19 files
generating filter 'Header Files' from 11 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] resize_util.vcxproj
generating filter 'Source Files' from 3 files
generating filter 'Header Files' from 2 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] vpx_temporal_svc_encoder.vcxproj
generating filter 'Source Files' from 13 files
generating filter 'Header Files' from 8 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] simple_decoder.vcxproj
generating filter 'Source Files' from 15 files
generating filter 'Header Files' from 10 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] postproc.vcxproj
generating filter 'Source Files' from 15 files
generating filter 'Header Files' from 10 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] decode_to_md5.vcxproj
generating filter 'Source Files' from 18 files
generating filter 'Header Files' from 12 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] simple_encoder.vcxproj
generating filter 'Source Files' from 13 files
generating filter 'Header Files' from 8 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] vp9_lossless_encoder.vcxproj
generating filter 'Source Files' from 13 files
generating filter 'Header Files' from 8 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] twopass_encoder.vcxproj
generating filter 'Source Files' from 13 files
generating filter 'Header Files' from 8 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] decode_with_drops.vcxproj
generating filter 'Source Files' from 15 files
generating filter 'Header Files' from 10 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] set_maps.vcxproj
generating filter 'Source Files' from 13 files
generating filter 'Header Files' from 8 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] vp8cx_set_ref.vcxproj
generating filter 'Source Files' from 13 files
generating filter 'Header Files' from 8 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
    [vcproj] vp9cx_set_ref.vcxproj
generating filter 'Source Files' from 12 files
generating filter 'Header Files' from 7 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
make[1]: warning:  Clock skew detected.  Your build may be incomplete.
make[1]: Warning: File '.projects' has modification time 0.11 s in the future
    [vcproj] tiny_ssim.vcxproj
generating filter 'Source Files' from 14 files
generating filter 'Header Files' from 10 files
generating filter 'Build Files' from 2 files
generating filter 'References' from 1 files
Ignored files list (0 items) is:
make[1]: warning:  Clock skew detected.  Your build may be incomplete.
make[1]: Warning: File '.projects' has modification time 0.11 s in the future
make[1]: Nothing to be done for 'all'.
make[1]: warning:  Clock skew detected.  Your build may be incomplete.
make[1]: Warning: File 'tiny_ssim.vcxproj' has modification time 0.064 s in the future
    [CREATE] vpx.sln
../libvpx-master/build/make/gen_msvs_sln.sh 
             --dep=resize_util:vpx  --dep=vpxdec:vpx  --dep=vp9_lossless_encoder:vpx  --dep=decode_with_drops:vpx  --dep=tiny_ssim:vpx  --dep=test_rc_interface:vpx  --dep=simple_decoder:vpx  --dep=test_intra_pred_speed:vpx  --dep=test_libvpx:vpx  --dep=set_maps:vpx  --dep=vp9rc:vpx  --dep=vpxenc:vpx  --dep=vp9cx_set_ref:vpx  --dep=vp9_spatial_svc_encoder:vpx  --dep=vp8cx_set_ref:vpx  --dep=decode_to_md5:vpx  --dep=postproc:vpx  --dep=twopass_encoder:vpx  --dep=simple_encoder:vpx  --dep=vpx_temporal_svc_encoder:vpx 
            --dep=test_libvpx:gtest 
            --ver=16
            --out=vpx.sln vpx.vcxproj resize_util.vcxproj vpxdec.vcxproj vp9_lossless_encoder.vcxproj decode_with_drops.vcxproj tiny_ssim.vcxproj test_rc_interface.vcxproj simple_decoder.vcxproj test_intra_pred_speed.vcxproj test_libvpx.vcxproj set_maps.vcxproj vp9rc.vcxproj vpxenc.vcxproj vp9cx_set_ref.vcxproj vp9_spatial_svc_encoder.vcxproj vp8cx_set_ref.vcxproj decode_to_md5.vcxproj postproc.vcxproj gtest.vcxproj twopass_encoder.vcxproj simple_encoder.vcxproj vpx_temporal_svc_encoder.vcxproj
make[1]: Warning: File 'vpx.sln.mk' has modification time 0.083 s in the future
  * msbuild.exe not found in path.
  *
  * You will have to build all configurations manually using the
  * Visual Studio IDE. To allow make to build them automatically,
  * add the Common7/IDE directory of your Visual Studio
  * installation to your path, eg:
  *   C:Program FilesMicrosoft Visual Studio 10.0Common7IDE
  *
  * Skipping build of Debug|Win32 (msbuild.exe not in path).
  *
  * Skipping build of Release|Win32 (msbuild.exe not in path).
  *
make[1]: warning:  Clock skew detected.  Your build may be incomplete.

0 人点赞