X
X
X
There are three ways to create binaries of this package for Microsoft Windows:
1) Native binaries, built using the mingw tool chain.
2) Native binaries, built using the MS Visual C/C++ tool chain.
3) Binaries for the Cygwin environment.
===============================================================================
1) Native binaries, built using the mingw tool chain.
PATH=/usr/local/mingw32/bin:/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH
export PATH
./configure --host=i686-w64-mingw32 --prefix=/usr/local/mingw32 \
CC=i686-w64-mingw32-gcc \
CXX=i686-w64-mingw32-g++ \
CPPFLAGS="-I/usr/local/mingw32/include -Wall" \
LDFLAGS="-L/usr/local/mingw32/lib"
make
make check
PATH=/usr/local/mingw64/bin:/usr/x86_64-w64-mingw32/sys-root/mingw/bin:$PATH
export PATH
./configure --host=x86_64-w64-mingw32 --prefix=/usr/local/mingw64 \
CC=x86_64-w64-mingw32-gcc \
CXX=x86_64-w64-mingw32-g++ \
CPPFLAGS="-I/usr/local/mingw64/include -Wall" \
LDFLAGS="-L/usr/local/mingw64/lib"
make
make check
Installation:
make install
(*) Note: The MSYS2 environment as a development environment is *not*
supported. This environment contains an ignoble and ignominious hack:
In a program invocation, the program *by default* receives different
arguments than the ones that the caller has passed. See
<https://www.msys2.org/wiki/Porting/#filesystem-namespaces>.
All program invocations in this environment are therefore unreliable.
===============================================================================
2) Native binaries, built using the MS Visual C/C++ tool chain.
Note that binaries created with MSVC have a distribution constraint: They
depend on a closed-source library ('msvcr90.dll' for MSVC 9.0,
'vcruntime140.dll' for MSVC 14.0, and so on) which is not normally part of
a Windows installation.
You cannot distribute 'vcruntime*.dll' with the binaries - this would be a
violation of the GPL and of the Microsoft EULA.
You can distribute the binaries without including 'vcruntime*.dll'. Users
who don't have this library on their system will require to pull some files
(api-ms-win*.dll) through the Windows Update mechanism, see
https://support.microsoft.com/en-us/kb/2999226 .
This recipe requires also a Cygwin environment (with 'bash', the common POSIX
commands, and 'make') as a build environment. Building with 'nmake' is not
supported.
For this, you need to install
* Cygwin (from https://cygwin.com/),
* some packages available from the Cygwin package installer:
make
Make sure that the MSVC tools ("cl" etc.) are found in PATH and the
environment variables INCLUDE and LIB are set appropriately.
In a typical MSVC 9.0 installation, it can be achieved by running
C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat
In a typical MSVC 14.0 installation on Windows 10, it can be achieved
- for creating 32-bit binaries: through the following bash commands:
# Set environment variables for using MSVC 14,
# for creating native 32-bit Windows executables.
PATH=/usr/local/msvc32/bin:$PATH
export PATH
win32_target=_WIN32_WINNT_WINXP # for MSVC 9.0
win32_target=_WIN32_WINNT_VISTA # possibly for MSVC >= 10.0
win32_target=_WIN32_WINNT_WIN7 # possibly for MSVC >= 10.0
win32_target=_WIN32_WINNT_WIN8 # possibly for MSVC >= 10.0
PATH=/usr/local/msvc64/bin:$PATH
export PATH
Installation:
make install
===============================================================================
3) Binaries for the Cygwin environment.
The generic instructions in the INSTALL file apply. But here are more
specific ones.
PATH=/usr/local/cygwin32/bin:/usr/i686-pc-cygwin/sys-root/usr/bin:$PATH
export PATH
./configure --host=i686-pc-cygwin --prefix=/usr/local/cygwin32 \
CC=i686-pc-cygwin-gcc \
CXX=i686-pc-cygwin-g++ \
CPPFLAGS="-I/usr/local/cygwin32/include -Wall" \
LDFLAGS="-L/usr/local/cygwin32/lib"
make
make check
PATH=/usr/local/cygwin64/bin:$PATH
export PATH
./configure --host=x86_64-pc-cygwin --prefix=/usr/local/cygwin64 \
CC=x86_64-pc-cygwin-gcc \
CXX=x86_64-pc-cygwin-g++ \
CPPFLAGS="-I/usr/local/cygwin64/include -Wall" \
LDFLAGS="-L/usr/local/cygwin64/lib"
make
make check
Installation:
make install
===============================================================================
Dependencies:
This package depends on GNU libiconv. (See the file DEPENDENCIES.) Before
building this package, you need to build GNU libiconv, in the same development
environment, with the same configure options, and install it ("make install").
===============================================================================