Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Windows 编译说明

xosdy edited this page Nov 11, 2014 · 3 revisions

0. 先决条件

安装 CMake, Boost, OpenSSL, Protocol Buffers 的最新版本, 如需要 GUI 可选择安装最新的 Qt.

1. 环境设置

添加 Qt 对应的 CMake 模块路径到 CMAKE_PREFIX_PATH 环境变量下, 如在 Qt 5.3.2 for Windows 64-bit (VS 2013, OpenGL) 下设置为 C:\Qt\Qt5.3.2\5.3\msvc2013_64_opengl\lib\cmake.

设置 PROTOBUF_SRC_ROOT_FOLDER 变量的值为 protobuf 根目录, 并对其进行编译.

其他包若安装于默认路径, CMake 会自动进行查找, 否则设置相应的环境变量或在配置 CMake 时设置路径.

2. 构建

使用 Visual Studio

运行 CMake, 设置工程目录和构建目录(建议放在工程下的build目录里), 点击 Configure 后选择 Visual Studio 12 2013 Win64 后按 Finish. 点击 Generate 生成 Visual Studio 解决方案.

打开 build/avim.sln, 执行 BUILD -> Build Solution (F7), 泡杯咖啡后即可完成构建.

使用 MinGW