0

我不知道C++,但我需要构建 C++ 应用程序 - Osmium 工具。我不知道构建 C++ 程序真的很难。我想要的只是创建.exe文件来合并地图。这是我的简单目标。

所以文档说

在 Windows 上,您可以使用 Visual Studio C++ 编译器和 nmake 进行编译。可以使用 conda 安装必要的依赖项。有关编译 osmium-tool 的必要命令,请参见appveyor.yml

appveyor.yml文档说:

环境:矩阵:-配置:调试-配置:发布

浅克隆:真

操作系统(构建VM模板)操作系统:Visual Studio 2015

平台:x64

在 repo 克隆 init 之前一开始就调用的脚本:

克隆目录clone_folder:c:\projects\osmium-tool

安装: - cd c:\projects - git clone --depth 1 https://github.com/osmcode/libosmium - git clone --depth 1 https://github.com/mapbox/protozero

build_script: - cd c:\projects/osmium-tool - build-appveyor.bat

我已经完成了上述所有步骤,现在我正在尝试在 Windows 10 中运行:

build-appveyor.bat

但是,我看到了错误:

System cannot find the path specified

一个图像: 在此处输入图像描述

伙计们,我做错了什么?请帮我!任何帮助将不胜感激。

4

1 回答 1

1

经过一些错误和研究的尝试(我开始时对 c++ 不太熟悉),我刚刚得到了 osmium 来为 Windows 编译。这是我的笔记——

下载并安装预建的 64 位 boost

https://downloads.sourceforge.net/project/boost/boost-binaries/1.63.0/boost_1_63_0-msvc-14.0-64.exe

在 C:\projects

git clone --depth 1 https://github.com/osmcode/libosmium
git clone --depth 1 https://github.com/mapbox/protozero
git clone https://github.com/osmcode/osmium-tool
    - Checkout latest osmium-tool tag

VS2019

- Install desktop development with c++
- Install MSVC v140 - VS 2015 C++ build tools (v14.00)

build-appveyor.bat
- Update vcvarsall.bat location for VS2019 install location (VC\Auxiliary\Build\vcvarsall.bat)
- Changed cmake_cmd "Visual Studio 14 Win64" to "Visual Studio 16"
- Changed toolsversion from 14.0 to Current
- ensure DBOOST_ROOT path matches installed path of DBOOST e.g.  C:/local/boost_1_63_0

VS2015社区版

Download cmake, add to path e.g. C:\Program Files\CMake\bin
build-appveyor.bat
- Update vcvarsall.bat location for VS2019 install location (VC\vcvarsall.bat)
- ensure DBOOST_ROOT path matches installed path of DBOOST e.g.  C:/local/boost_1_63_0

下载最新的 nuget.exe 并放在路径中(在 system32 中不起作用)

运行 build-local.bat

将 64 位发行版 DLL 从 bzip2、libexpat nuget pacakges 复制到与 osmium.exe 相同的目录

于 2022-02-06T16:24:34.363 回答