Building C++ project using build-appveyor

429 views Asked by At

I do not know C++, but I need to build C++ application - Osmium tool. I have not known that it is really hard to build C++ programs. What I want is just create .exe file to merge maps. That is my simple goal.

So docs says:

On Windows you can compile with the Visual Studio C++ compiler and nmake. The necessary dependencies can be installed with conda. See appveyor.yml for the necessary commands to compile osmium-tool.

appveyor.yml docs says:

environment: matrix: - config: Debug - config: Release

shallow_clone: true

Operating system (build VM template) os: Visual Studio 2015

platform: x64

scripts that are called at very beginning, before repo cloning init:

clone directory clone_folder: c:\projects\osmium-tool

install: - 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

I've done all the above steps and now I'm trying to run in Windows 10:

build-appveyor.bat

However,I see the error:

System cannot find the path specified

An image: enter image description here

Guys what am I doing wrong? Please, help me! Any help would be greatly appreciated.

1

There are 1 answers

0
Andy Arismendi On BEST ANSWER

I just got osmium to compile for Windows after a bit of trial of error and research (wasn't very familiar with c++ when I started). Here are my notes -

Download and install prebuilt 64-bit boost

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

In 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 community edition

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

Download latest nuget.exe and place in path (won't work in system32)

Run build-local.bat

Copy 64-bit release DLLs from bzip2, libexpat nuget pacakges to the same directory as osmium.exe