2 Building XZ Utils with Microsoft Visual Studio
3 ==============================================
8 liblzma got MSVC support in XZ Utils 5.2.0, and the xz and xzdec
9 command line tools in XZ Utils 5.6.0.
11 Note: xz and xzdec depend on the the included GNU getopt
12 which is licensed under the GNU LGPLv2.1.
14 MSVC 2013 update 2 and later have enough C99 support to build
15 liblzma from XZ Utils 5.2.0 and later without modifications.
17 Visual Studio 2015 or later is required to build the command line
24 It is recommended to use CMake to generate build files for MSVC.
25 Visual Studio project files are no longer provided (XZ Utils 5.4.x
26 were the last versions to include the project files).
28 CMake-based build includes tests for liblzma but not for the
35 liblzma API headers declare the functions with __declspec(dllimport)
36 by default. To avoid this when using static liblzma from your code,
37 #define LZMA_API_STATIC before #including <lzma.h>.
39 MSVC gives a bunch of compiler warnings. Some warnings are specific
40 to 32-bit or 64-bit build and some appear for both builds. These
41 are known and shouldn't be a problem. Some of them will probably
42 be fixed in the future.