### 5.3 MinGW
We provide support for both 64bit and 32bit builds using MinGW/msys2. [https://www.msys2.org](https://www.msys2.org)
Support for MinGW/msys1.0 32 bit build was provided for Exiv2 v0.26. MinGW/msys1.0 is not supported by Team Exiv2 for Exiv2 v0.27 and later.
There is a discussion on the web about installing GTest: [https://github.com/Exiv2/exiv2/issues/575](https://github.com/Exiv2/exiv2/issues/575)
#### MinGW/msys2 64 bit
Install: [http://repo.msys2.org/distrib/x86\_64/msys2-x86\_64-20180531.exe](http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe)
I use the following batch file to start the MinGW/msys2 64 bit bash shell from the Dos Command Prompt (cmd.exe)
?wzxhzdk:38?
#### MinGW/msys2 32 bit
Install: [http://repo.msys2.org/distrib/i686/msys2-i686-20180531.exe](http://repo.msys2.org/distrib/i686/msys2-i686-20180531.exe)
I use the following batch file to start the MinGW/msys2 32 bit bash shell from the Dos Command Prompt (cmd.exe)
?wzxhzdk:39?
#### Install MinGW Dependencies
Install tools and dependencies:
?wzxhzdk:40?
You can upgrade all installed packages on your system with the following command. For me, this broke msys32 and I had to reinstall msys32 and all the dependencies. Your experience may be different.
?wzxhzdk:41?
#### Download exiv2 from github and build
?wzxhzdk:42?
#### MinGW and Regex
The exiv2 command line program provides an option **`--grep`** to filter output. The implementation requires the header file **`<regex.h>`** and supporting library to be available during the build. When not available, the option **`--grep`** degrades to a substring match. Because there are several versions of **`<regex.h>`** available on the MinGW platform, detection of regex is always disabled on this platform and uses substring match. The following command reveals if regex is included in your build:
?wzxhzdk:43?
[TOC](#TOC)
### 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).
?wzxhzdk:44?
[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".
?wzxhzdk:45?
[TOC](#TOC)
### 5.6 Unix
Exiv2 can be built on many Unix and Linux distros. With v0.27.2, we are starting to actively support the Unix Distributions NetBSD and FreeBSD. We hope to add CI support for these platforms in v0.27.3.
I have provided notes here based on my experience with these platforms. Feedback is welcome.
I am willing to support Exiv2 on other commercial Unix distributions such as AIX, HP-UX and OSF/1 provided you provide with an ssh account for your platform. I will require super-user privileges to install software.
#### NetBSD
You can build exiv2 from source using the methods described for linux. I built and installed exiv2 using "Pure CMake" and didn't require conan.
You will want to use the package manager `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
Clang is pre-installed as ``/usr/bin/{cc|c++}` as well has libz and expat. FreeBSD uses pkg as the package manager which I used to install cmake and git.
?wzxhzdk:46?
To run the Exiv2 test suite, I installed bash and python. The test suite requires additional work as the platform `diff` command does not understand the option `--binary` and returns an error. In consequence, the test harness returns lots of errors. I hope to address this in v0.27.3.
?wzxhzdk:47?
#### Solaris
Work in progress: [https://github.com/Exiv2/exiv2/issues/902](https://github.com/Exiv2/exiv2/issues/902)
[TOC](#TOC)
Robin Mills
Revised: 2019-07-29