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