MYNT-EYE-S-SDK/doc/zh-Hans/guide_build_win.md
2018-04-23 23:11:11 +08:00

2.3 KiB
Raw Blame History

编译 on Windows

Windows 10

前提条件

  • Git,用于获取代码。
  • CMake,用于构建编译。
  • Doxygen,用于生成文档。

最终命令提示符Command Prompt, cmd里可找到如下命令

>cmake --version
cmake version 3.10.1

>git --version
git version 2.11.1.windows.1

>doxygen --version
1.8.13

以 Visual Studio 2015 举例,请在系统环境变量 PATH 里添加上如下路径:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
C:\Program Files (x86)\MSBuild\14.0\Bin

最终命令提示符Command Prompt, cmd里可找到如下命令

>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86

>link
Microsoft (R) Incremental Linker Version 14.00.24215.1

>lib
Microsoft (R) Library Manager Version 14.00.24215.1

>msbuild
Microsoft (R) 生成引擎版本 14.0.25420.1

打开 MSYS2 MSYS ,然后执行:

$ pacman -Syu
$ pacman -S make

并在系统环境变量 PATH 里添加上如下路径:

C:\msys64\usr\bin

最终命令提示符Command Prompt, cmd里可找到如下命令

>make --version
GNU Make 4.2.1

获取代码

>git clone https://github.com/slightech/MYNT-EYE-SDK-2.git

准备依赖

>cd mynt-eye-sdk-2
>make init
Make init
Init deps
Install cmd: pacman -S
Install deps: git clang-format
pacman -S clang-format (not exists)
error: target not found: clang-format
pip install --upgrade autopep8 cpplint pylint requests
...
Init git hooks
ERROR: clang-format-diff is not installed!
Expect cmake version >= 3.0
cmake version 3.10.1
How to upgrade cmake in Ubuntu
  https://askubuntu.com/questions/829310/how-to-upgrade-cmake-in-ubuntu

编译代码

>make install