0

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.

Andy Arismendi
  • 50,577
  • 16
  • 107
  • 124
Learner
  • 417
  • 6
  • 24
  • 1
    Do you have VS C++ and nmake installed? Does typing `nmake` on the command line give an error? – pcarter Dec 17 '19 at 13:13
  • yeah, I've intstalled C++ and according to the [docs - NMAKE is included when you install Visual Studio or the Visual C++](https://technet.microsoft.com/en-us/dd9y37ha(v=vs.99)) – Learner Dec 17 '19 at 13:43
  • 1
    But is the environment set up so you can run `nmake` from the command line? If you can't do that yourself, the script isn't going to be able to either. See https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019 – pcarter Dec 17 '19 at 13:58
  • @pcarter I'm sorry for the dumb question. however, what command should I run to test? – Learner Dec 17 '19 at 14:28
  • 1
    Just type `nmake` on the command line, if you get _'nmake' is not recognized as an internal or external command, operable program or batch file._ your environment isn't set up. – pcarter Dec 17 '19 at 14:39

1 Answers1

1

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

Andy Arismendi
  • 50,577
  • 16
  • 107
  • 124