### 5.4 Cygwin
Download: [https://cygwin.com/install.html](https://cygwin.com/install.html) and run setup-x86_64.exe for 64 Bit Cygwin, or setup-x86.exe for 32 bit Cygwin. I install into c:\\cygwin64 and c:\\cygwin32
You need:
make, cmake, gcc, gettext-devel pkg-config, dos2unix, zlib-devel, libexpat1-devel, git, python3-interpreter, libiconv, libxml2-utils, libncurses.
Download and build libiconv-1.15: [https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz](https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz)
There is a discussion on the web about installing GTest: [https://github.com/Exiv2/exiv2/issues/575](https://github.com/Exiv2/exiv2/issues/575)
Download and build cmake from source because I can't get the cygwin installed cmake 3.6.2 to work.
To build cmake from source, you need libncurses. [https://cmake.org/download/](https://cmake.org/download/)
I use the following batch file "cygwin64.bat" to start the Cygwin/64 bit bash shell from the Dos Command Prompt (cmd.exe).
```bat
@echo off
setlocal
set "PATH=c:\cygwin64\usr\local\bin;c:\cygwin64\bin;c:\cygwin64\usr\bin;c:\cygwin64\usr\sbin;"
if NOT EXIST %HOME% mkdir %HOME%
set "HOME=c:\cygwin64\home\rmills"
cd %HOME%
set "PS1=\! CYGWIN64:\u@\h:\w \$ "
bash.exe -norc
```
[TOC](#TOC)
### 5.5 Microsoft Visual C++
We recommend that you use Conan to build Exiv2 using Microsoft Visual C++. Exiv2 v0.27 can be built with Visual Studio versions 2008 and later. We actively support and build with Visual Studio 2015, 2017 and 2019.
As well as Microsoft Visual Studio, you will need to install CMake, Python3, and Conan.
1) Binary installers for CMake on Windows are availably from [https://cmake.org/download/](https://cmake.org/download/).
2) Binary installers for Python3 are available from [python.org](https://python.org)
3) Conan can be installed using python/pip. Details in [README-CONAN.md](README-CONAN.md)
I use the following batch file to start cmd.exe. I do this to reduce the complexity of the path which grows as various tools are installed on Windows. The purpose of this script is to ensure a "stripped down path".
```bat
@echo off
setlocal
cd %HOMEPATH%
set "PATH=C:\Python37\;C:\Python27\;C:\Python27\Scripts;C:\Perl64\site\bin;C:\Perl64\bin;C:\WINDOWS\system32;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;c:\Program Files\cmake\bin;"
cmd
```
[TOC](#TOC)
### Unix
Exiv2 can be built on many Unix and Linux distros. We actively support the Unix Distributions NetBSD and FreeBSD
#### NetBSD
NetBSD uses pkgsrc as the package manager. You can build exiv2 with the commands:
```bash
$ cd /usr/pkgsrc/graphics/exiv2
$ make install
```
You can build exiv2 from source using the methods described for linux. I build and installed exiv2 using "Pure CMake" and didn't require conan.
You will want to use `pkgsrc` to build/install
1) gcc (currently GCC 5.5.0)
2) python3
3) cmake
4) bash
5) sudo
6) chksum
7) gettext
I entered links into the file system `# ln -s /usr/pkg/bin/python37 /usr/local/bin/python3` and `# ln -s /usr/pkg/bin/bash /bin/bash`
It's important to ensure that `LD_LIBRARY_PATH` includes /usr/local/lib and /usr/pkg/lib. It's important to ensure that PATH includes `/usr/local/bin`, `/usr/pkg/bin` and`/usr/pkg/sbin`.
#### FreeBSD
FreeBSD uses pkg as the package manager. You should install the dependency expat. libz is already installed. As with NetBSD, you should use pkg to install python3, cmake, bash, sudo, gettext and gcc. The default GCC compiler is currently 8.3.0.
[TOC](#TOC)
Written by Robin Mills
robin@clanmills.com
Revised: 2019-05-09