From: Lasse Collin Date: Sun, 29 Apr 2012 08:51:25 +0000 (+0300) Subject: Windows: Update notes about static linking with MSVC. X-Git-Tag: v5.0.4~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afb6ce8c82ffef8f2505a3759da72a733c7b0b8f;p=thirdparty%2Fxz.git Windows: Update notes about static linking with MSVC. --- diff --git a/windows/README-Windows.txt b/windows/README-Windows.txt index 786d66bd..72c5a988 100644 --- a/windows/README-Windows.txt +++ b/windows/README-Windows.txt @@ -90,10 +90,15 @@ Microsoft Visual C++ lib /def:liblzma.def /out:liblzma.lib /machine:x64 - Linking against static liblzma should work too. 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 + Linking against static liblzma might work too, but usually you + should use liblzma.dll if possible. (Or, if having a decompressor + is enough, consider using XZ Embedded or LZMA SDK which can be + 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 #include