OLD | NEW |
1 | 1 |
2 XZ Utils for Windows | 2 XZ Utils for Windows |
3 ==================== | 3 ==================== |
4 | 4 |
5 Introduction | 5 Introduction |
6 ------------ | 6 ------------ |
7 | 7 |
8 This package includes command line tools (xz.exe and a few others) | 8 This package includes command line tools (xz.exe and a few others) |
9 and the liblzma compression library from XZ Utils. You can find the | 9 and the liblzma compression library from XZ Utils. You can find the |
10 latest version and full source code from <http://tukaani.org/xz/>. | 10 latest version and full source code from <http://tukaani.org/xz/>. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 first. You need the "lib" command from MSVC and liblzma.def from | 83 first. You need the "lib" command from MSVC and liblzma.def from |
84 the "doc" directory of this package. Here is the command that works | 84 the "doc" directory of this package. Here is the command that works |
85 on 32-bit x86: | 85 on 32-bit x86: |
86 | 86 |
87 lib /def:liblzma.def /out:liblzma.lib /machine:ix86 | 87 lib /def:liblzma.def /out:liblzma.lib /machine:ix86 |
88 | 88 |
89 On x86-64, the /machine argument has to naturally be changed: | 89 On x86-64, the /machine argument has to naturally be changed: |
90 | 90 |
91 lib /def:liblzma.def /out:liblzma.lib /machine:x64 | 91 lib /def:liblzma.def /out:liblzma.lib /machine:x64 |
92 | 92 |
93 Linking against static liblzma should work too. Rename liblzma.a | 93 Linking against static liblzma might work too, but usually you |
94 to e.g. liblzma_static.lib and tell MSVC to link against it. You | 94 should use liblzma.dll if possible. (Or, if having a decompressor |
95 also need to tell lzma.h to not use __declspec(dllimport) by defining | 95 is enough, consider using XZ Embedded or LZMA SDK which can be |
96 the macro LZMA_API_STATIC. You can do it either in the C/C++ code | 96 compiled with MSVC.) |
| 97 |
| 98 To try linking against static liblzma, rename liblzma.a to e.g. |
| 99 liblzma_static.lib and tell MSVC to link against it. You also need |
| 100 to tell lzma.h to not use __declspec(dllimport) by defining the |
| 101 macro LZMA_API_STATIC. You can do it either in the C/C++ code |
97 | 102 |
98 #define LZMA_API_STATIC | 103 #define LZMA_API_STATIC |
99 #include <lzma.h> | 104 #include <lzma.h> |
100 | 105 |
101 or by adding it to compiler options. | 106 or by adding it to compiler options. |
102 | 107 |
103 | 108 |
104 Other compilers | 109 Other compilers |
105 | 110 |
106 If you are using some other compiler, see its documentation how to | 111 If you are using some other compiler, see its documentation how to |
107 create an import library (if it is needed). If it is simple, I | 112 create an import library (if it is needed). If it is simple, I |
108 might consider including the instructions here. | 113 might consider including the instructions here. |
109 | 114 |
110 | 115 |
111 Reporting bugs | 116 Reporting bugs |
112 -------------- | 117 -------------- |
113 | 118 |
114 Report bugs to <lasse.collin@tukaani.org> (in English or Finnish). | 119 Report bugs to <lasse.collin@tukaani.org> (in English or Finnish). |
115 | 120 |
OLD | NEW |