mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
Windows: Update notes about static linking with MSVC.
This commit is contained in:
parent
7c3ba2ed5c
commit
afb6ce8c82
1 changed files with 9 additions and 4 deletions
|
@ -90,10 +90,15 @@ Microsoft Visual C++
|
||||||
|
|
||||||
lib /def:liblzma.def /out:liblzma.lib /machine:x64
|
lib /def:liblzma.def /out:liblzma.lib /machine:x64
|
||||||
|
|
||||||
Linking against static liblzma should work too. Rename liblzma.a
|
Linking against static liblzma might work too, but usually you
|
||||||
to e.g. liblzma_static.lib and tell MSVC to link against it. You
|
should use liblzma.dll if possible. (Or, if having a decompressor
|
||||||
also need to tell lzma.h to not use __declspec(dllimport) by defining
|
is enough, consider using XZ Embedded or LZMA SDK which can be
|
||||||
the macro LZMA_API_STATIC. You can do it either in the C/C++ code
|
compiled with MSVC.)
|
||||||
|
|
||||||
|
To try linking against static liblzma, rename liblzma.a to e.g.
|
||||||
|
liblzma_static.lib and tell MSVC to link against it. You also need
|
||||||
|
to tell lzma.h to not use __declspec(dllimport) by defining the
|
||||||
|
macro LZMA_API_STATIC. You can do it either in the C/C++ code
|
||||||
|
|
||||||
#define LZMA_API_STATIC
|
#define LZMA_API_STATIC
|
||||||
#include <lzma.h>
|
#include <lzma.h>
|
||||||
|
|
Loading…
Reference in a new issue