0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-28 16:15:23 +08:00
Matt Powley f2018ab317 Fixes for Windows XP compatibility
A Visual Studio build from master (commit id: dac5b45dfb224ff184a7aed39c5859ae5bac3803) using the v140_xp toolset yields a binary that is not XP compatible.

Two libraries contain exports that cannot be found:
 -  IPHLPAPI.DLL : if_nametoindex
 - KERNEL32.DLL : InitializeConditionVariable

The latter export is already dealt with in the file './src/condition_variable.hpp'; however this requires setting the _WIN32_WINNT pre-processor definition.
I am not experienced enough to figure a work around for the 'if_nametoindex' method, so I have created a new pre-processor definition 'ZMQ_HAVE_WINDOWS_TARGET_XP' and removed the calling of the function with the limitation that these builds cannot handle a IPv6 address with an adapter name.

To make it easier for people targeting XP with an MSVC build I have modified the MSBuild property file to add/modify the pre-processor definitions if they are building using a XP targeting tool set; such as v140_xp.
2016-03-31 15:45:00 +01:00
..
2014-05-06 15:21:29 -07:00

For building on Windows, use:

     ./configure.bat
     cd build
     ./buildall.bat

This requires that the CMD.EXE be created using the DevStudio Tools link to create a CMD.EXE windo.

Visual Studio product and C++ compiler Versions:

Visual C++ 2008 => Visual C++ 9
Visual C++ 2010 => Visual C++ 10
Visual C++ 2012 => Visual C++ 11
Visual C++ 2013 => Visual C++ 12
Visual C++ 2015 => Visual C++ 14

Note that solution file icons reflect the compiler version ([9], [10], [11], [12], [14]), not the product version.

The vs2015/vs2013/vs2012/vs2010 solution and project files differ only in versioning.

More info here:

http://en.wikipedia.org/wiki/Visual_C%2B%2B

If multiple DevStudio versions are installed on the machine, you can run buildall.bat on separate windows that each were created by the desired DevStudio target.

If you prefer to build all versions (or several) at the same time, you should uncomment the specific version desired in buildall.bat to build them from a single window.