Windows 10
前提条件
最终,命令提示符(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
编译前,可在系统终端(Windows 命令提示符)里如下指定 OpenCV 路径,其为 OpenCVConfig.cmake
目录:
# Linux, macOS
export OpenCV_DIR=~/opencv
# Windows
set OpenCV_DIR=C:\opencv
编译代码