【QT+QGIS跨平台编译】之六:【LZMA+Qt跨平台编译】(一套代码、一套框架,跨平台编译)

文章目录

  • 一、lzma介绍
  • 二、文件下载
  • 三、文件分析
  • 四、pro文件
  • 五、编译实践

一、lzma介绍

LZMA(Lempel-Ziv-Markov chain-Algorithm的缩写),是一个Deflate和LZ77算法改良和优化后的压缩算法。
libLzma是基于LZMA压缩算法封装的开源库。2001年被首次应用于7-Zip压缩工具中,是 2001年以来得到发展的一个数据压缩算法。
在一般的情况下压缩率比 bzip2 为高,用于压缩的可变字典最大可达4GB。
libLzma目前的版本:lzma-5.2.7
在这里插入图片描述


二、文件下载

liblzma网址:
LZMA
在这里插入图片描述

获取xz-5.2.7.tar.gz文件。


三、文件分析

解压缩xz-5.2.7.tar.gz
有CMakeLists.txt文件:
在这里插入图片描述

文件中,标识了相应的头文件和源文件:

add_library(liblzma
    src/common/mythread.h
    src/common/sysdefs.h
    src/common/tuklib_common.h
    src/common/tuklib_config.h
    src/common/tuklib_cpucores.c
    src/common/tuklib_cpucores.h
    src/common/tuklib_integer.h
    src/common/tuklib_physmem.c
    src/common/tuklib_physmem.h
    src/liblzma/api/lzma.h
    src/liblzma/api/lzma/base.h
    src/liblzma/api/lzma/bcj.h
    src/liblzma/api/lzma/block.h
    src/liblzma/api/lzma/check.h
    src/liblzma/api/lzma/container.h
    src/liblzma/api/lzma/delta.h
    src/liblzma/api/lzma/filter.h
    src/liblzma/api/lzma/hardware.h
    src/liblzma/api/lzma/index.h
    src/liblzma/api/lzma/index_hash.h
    src/liblzma/api/lzma/lzma12.h
    src/liblzma/api/lzma/stream_flags.h
    src/liblzma/api/lzma/version.h
    src/liblzma/api/lzma/vli.h
    src/liblzma/check/check.c
    src/liblzma/check/check.h
    src/liblzma/check/crc32_fast.c
    src/liblzma/check/crc32_table.c
    src/liblzma/check/crc32_table_be.h
    src/liblzma/check/crc32_table_le.h
    src/liblzma/check/crc64_fast.c
    src/liblzma/check/crc64_table.c
    src/liblzma/check/crc64_table_be.h
    src/liblzma/check/crc64_table_le.h
    src/liblzma/check/crc_macros.h
    src/liblzma/check/sha256.c
    src/liblzma/common/alone_decoder.c
    src/liblzma/common/alone_decoder.h
    src/liblzma/common/alone_encoder.c
    src/liblzma/common/auto_decoder.c
    src/liblzma/common/block_buffer_decoder.c
    src/liblzma/common/block_buffer_encoder.c
    src/liblzma/common/block_buffer_encoder.h
    src/liblzma/common/block_decoder.c
    src/liblzma/common/block_decoder.h
    src/liblzma/common/block_encoder.c
    src/liblzma/common/block_encoder.h
    src/liblzma/common/block_header_decoder.c
    src/liblzma/common/block_header_encoder.c
    src/liblzma/common/block_util.c
    src/liblzma/common/common.c
    src/liblzma/common/common.h
    src/liblzma/common/easy_buffer_encoder.c
    src/liblzma/common/easy_decoder_memusage.c
    src/liblzma/common/easy_encoder.c
    src/liblzma/common/easy_encoder_memusage.c
    src/liblzma/common/easy_preset.c
    src/liblzma/common/easy_preset.h
    src/liblzma/common/filter_buffer_decoder.c
    src/liblzma/common/filter_buffer_encoder.c
    src/liblzma/common/filter_common.c
    src/liblzma/common/filter_common.h
    src/liblzma/common/filter_decoder.c
    src/liblzma/common/filter_decoder.h
    src/liblzma/common/filter_encoder.c
    src/liblzma/common/filter_encoder.h
    src/liblzma/common/filter_flags_decoder.c
    src/liblzma/common/filter_flags_encoder.c
    src/liblzma/common/hardware_cputhreads.c
    src/liblzma/common/hardware_physmem.c
    src/liblzma/common/index.c
    src/liblzma/common/index.h
    src/liblzma/common/index_decoder.c
    src/liblzma/common/index_encoder.c
    src/liblzma/common/index_encoder.h
    src/liblzma/common/index_hash.c
    src/liblzma/common/memcmplen.h
    src/liblzma/common/outqueue.c
    src/liblzma/common/outqueue.h
    src/liblzma/common/stream_buffer_decoder.c
    src/liblzma/common/stream_buffer_encoder.c
    src/liblzma/common/stream_decoder.c
    src/liblzma/common/stream_decoder.h
    src/liblzma/common/stream_encoder.c
    src/liblzma/common/stream_encoder_mt.c
    src/liblzma/common/stream_flags_common.c
    src/liblzma/common/stream_flags_common.h
    src/liblzma/common/stream_flags_decoder.c
    src/liblzma/common/stream_flags_encoder.c
    src/liblzma/common/vli_decoder.c
    src/liblzma/common/vli_encoder.c
    src/liblzma/common/vli_size.c
    src/liblzma/delta/delta_common.c
    src/liblzma/delta/delta_common.h
    src/liblzma/delta/delta_decoder.c
    src/liblzma/delta/delta_decoder.h
    src/liblzma/delta/delta_encoder.c
    src/liblzma/delta/delta_encoder.h
    src/liblzma/delta/delta_private.h
    src/liblzma/lz/lz_decoder.c
    src/liblzma/lz/lz_decoder.h
    src/liblzma/lz/lz_encoder.c
    src/liblzma/lz/lz_encoder.h
    src/liblzma/lz/lz_encoder_hash.h
    src/liblzma/lz/lz_encoder_hash_table.h
    src/liblzma/lz/lz_encoder_mf.c
    src/liblzma/lzma/fastpos.h
    src/liblzma/lzma/fastpos_table.c
    src/liblzma/lzma/lzma2_decoder.c
    src/liblzma/lzma/lzma2_decoder.h
    src/liblzma/lzma/lzma2_encoder.c
    src/liblzma/lzma/lzma2_encoder.h
    src/liblzma/lzma/lzma_common.h
    src/liblzma/lzma/lzma_decoder.c
    src/liblzma/lzma/lzma_decoder.h
    src/liblzma/lzma/lzma_encoder.c
    src/liblzma/lzma/lzma_encoder.h
    src/liblzma/lzma/lzma_encoder_optimum_fast.c
    src/liblzma/lzma/lzma_encoder_optimum_normal.c
    src/liblzma/lzma/lzma_encoder_presets.c
    src/liblzma/lzma/lzma_encoder_private.h
    src/liblzma/rangecoder/price.h
    src/liblzma/rangecoder/price_table.c
    src/liblzma/rangecoder/range_common.h
    src/liblzma/rangecoder/range_decoder.h
    src/liblzma/rangecoder/range_encoder.h
    src/liblzma/simple/arm.c
    src/liblzma/simple/armthumb.c
    src/liblzma/simple/ia64.c
    src/liblzma/simple/powerpc.c
    src/liblzma/simple/simple_coder.c
    src/liblzma/simple/simple_coder.h
    src/liblzma/simple/simple_decoder.c
    src/liblzma/simple/simple_decoder.h
    src/liblzma/simple/simple_encoder.c
    src/liblzma/simple/simple_encoder.h
    src/liblzma/simple/simple_private.h
    src/liblzma/simple/sparc.c
    src/liblzma/simple/x86.c
)

预定义项信息:
在这里插入图片描述
在xz\windows\vs2019目录下,config.h文件中,列出了相关的预定义项信息:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述


四、pro文件

配置头文件:

#头文件
HEADERS +=  ./common/mythread.h \
            ./common/sysdefs.h \
            ./common/tuklib_common.h \
            ./common/tuklib_config.h \
            ./common/tuklib_cpucores.h \
            ./common/tuklib_integer.h \
            ./common/tuklib_physmem.h \
            ./liblzma/api/lzma.h \
            ./liblzma/api/lzma/base.h \
            ./liblzma/api/lzma/bcj.h \
            ./liblzma/api/lzma/block.h \
            ./liblzma/api/lzma/check.h \
            ./liblzma/api/lzma/container.h \
            ./liblzma/api/lzma/delta.h \
            ./liblzma/api/lzma/filter.h \
            ./liblzma/api/lzma/hardware.h \
            ./liblzma/api/lzma/index.h \
            ./liblzma/api/lzma/index_hash.h \
            ./liblzma/api/lzma/lzma12.h \
            ./liblzma/api/lzma/stream_flags.h \
            ./liblzma/api/lzma/version.h \
            ./liblzma/api/lzma/vli.h \
            ./liblzma/check/check.h \
            ./liblzma/check/crc32_table_be.h \
            ./liblzma/check/crc32_table_le.h \
            ./liblzma/check/crc64_table_be.h \
            ./liblzma/check/crc64_table_le.h \
            ./liblzma/check/crc_macros.h \
            ./liblzma/common/alone_decoder.h \
            ./liblzma/common/block_buffer_encoder.h \
            ./liblzma/common/block_decoder.h \
            ./liblzma/common/block_encoder.h \
            ./liblzma/common/common.h \
            ./liblzma/common/easy_preset.h \
            ./liblzma/common/filter_common.h \
            ./liblzma/common/filter_decoder.h \
            ./liblzma/common/filter_encoder.h \
            ./liblzma/common/index.h \
            ./liblzma/common/index_encoder.h \
            ./liblzma/common/memcmplen.h \
            ./liblzma/common/outqueue.h \
            ./liblzma/common/stream_decoder.h \
            ./liblzma/common/stream_flags_common.h \
            ./liblzma/delta/delta_common.h \
            ./liblzma/delta/delta_decoder.h \
            ./liblzma/delta/delta_encoder.h \
            ./liblzma/delta/delta_private.h \
            ./liblzma/lz/lz_decoder.h \
            ./liblzma/lz/lz_encoder.h \
            ./liblzma/lz/lz_encoder_hash.h \
            ./liblzma/lz/lz_encoder_hash_table.h \
            ./liblzma/lzma/fastpos.h \
            ./liblzma/lzma/lzma2_decoder.h \
            ./liblzma/lzma/lzma2_encoder.h \
            ./liblzma/lzma/lzma_common.h \
            ./liblzma/lzma/lzma_decoder.h \
            ./liblzma/lzma/lzma_encoder.h \
            ./liblzma/lzma/lzma_encoder_private.h \
            ./liblzma/rangecoder/price.h \
            ./liblzma/rangecoder/range_common.h \
            ./liblzma/rangecoder/range_decoder.h \
            ./liblzma/rangecoder/range_encoder.h \
            ./liblzma/simple/simple_coder.h \
            ./liblzma/simple/simple_decoder.h \
            ./liblzma/simple/simple_encoder.h \
            ./liblzma/simple/simple_private.h

配置源文件:

#源文件
SOURCES +=  ./common/tuklib_cpucores.c \
            ./common/tuklib_physmem.c \
            ./liblzma/check/check.c \
            ./liblzma/check/crc32_fast.c \
            ./liblzma/check/crc32_table.c \
            ./liblzma/check/crc64_fast.c \
            ./liblzma/check/crc64_table.c \
            ./liblzma/check/sha256.c \
            ./liblzma/common/alone_decoder.c \
            ./liblzma/common/alone_encoder.c \
            ./liblzma/common/auto_decoder.c \
            ./liblzma/common/block_buffer_decoder.c \
            ./liblzma/common/block_buffer_encoder.c \
            ./liblzma/common/block_decoder.c \
            ./liblzma/common/block_encoder.c \
            ./liblzma/common/block_header_decoder.c \
            ./liblzma/common/block_header_encoder.c \
            ./liblzma/common/block_util.c \
            ./liblzma/common/common.c \
            ./liblzma/common/easy_buffer_encoder.c \
            ./liblzma/common/easy_decoder_memusage.c \
            ./liblzma/common/easy_encoder.c \
            ./liblzma/common/easy_encoder_memusage.c \
            ./liblzma/common/easy_preset.c \
            ./liblzma/common/filter_buffer_decoder.c \
            ./liblzma/common/filter_buffer_encoder.c \
            ./liblzma/common/filter_common.c \
            ./liblzma/common/filter_decoder.c \
            ./liblzma/common/filter_encoder.c \
            ./liblzma/common/filter_flags_decoder.c \
            ./liblzma/common/filter_flags_encoder.c \
            ./liblzma/common/hardware_cputhreads.c \
            ./liblzma/common/hardware_physmem.c \
            ./liblzma/common/index.c \
            ./liblzma/common/index_decoder.c \
            ./liblzma/common/index_encoder.c \
            ./liblzma/common/index_hash.c \
            ./liblzma/common/outqueue.c \
            ./liblzma/common/stream_buffer_decoder.c \
            ./liblzma/common/stream_buffer_encoder.c \
            ./liblzma/common/stream_decoder.c \
            ./liblzma/common/stream_encoder.c \
            ./liblzma/common/stream_encoder_mt.c \
            ./liblzma/common/stream_flags_common.c \
            ./liblzma/common/stream_flags_decoder.c \
            ./liblzma/common/stream_flags_encoder.c \
            ./liblzma/common/vli_decoder.c \
            ./liblzma/common/vli_encoder.c \
            ./liblzma/common/vli_size.c \
            ./liblzma/delta/delta_common.c \
            ./liblzma/delta/delta_decoder.c \
            ./liblzma/delta/delta_encoder.c \
            ./liblzma/lz/lz_decoder.c \
            ./liblzma/lz/lz_encoder.c \
            ./liblzma/lz/lz_encoder_mf.c \
            ./liblzma/lzma/fastpos_table.c \
            ./liblzma/lzma/lzma2_decoder.c \
            ./liblzma/lzma/lzma2_encoder.c \
            ./liblzma/lzma/lzma_decoder.c \
            ./liblzma/lzma/lzma_encoder.c \
            ./liblzma/lzma/lzma_encoder_optimum_fast.c \
            ./liblzma/lzma/lzma_encoder_optimum_normal.c \
            ./liblzma/lzma/lzma_encoder_presets.c \
            ./liblzma/rangecoder/price_table.c \
            ./liblzma/simple/arm.c \
            ./liblzma/simple/armthumb.c \
            ./liblzma/simple/ia64.c \
            ./liblzma/simple/powerpc.c \
            ./liblzma/simple/simple_coder.c \
            ./liblzma/simple/simple_decoder.c \
            ./liblzma/simple/simple_encoder.c \
            ./liblzma/simple/sparc.c \
            ./liblzma/simple/x86.c

预定义项设置:

DEFINES -= UNICODE
DEFINES += DLL_EXPORT

# Prefix for symbols exported by tuklib_*.c files
DEFINES += TUKLIB_SYMBOL_PREFIX="lzma_"
# How many MiB of RAM to assume if the real amount cannot be determined.
DEFINES += ASSUME_RAM=128
# Define to 1 if crc32 integrity check is enabled.
DEFINES += HAVE_CHECK_CRC32
# Define to 1 if crc64 integrity check is enabled.
DEFINES += HAVE_CHECK_CRC64
# Define to 1 if sha256 integrity check is enabled.
DEFINES += HAVE_CHECK_SHA256
# Define to 1 if any of HAVE_DECODER_foo have been defined.
DEFINES += HAVE_DECODERS
# Define to 1 if arm decoder is enabled.
DEFINES += HAVE_DECODER_ARM
# Define to 1 if armthumb decoder is enabled.
DEFINES += HAVE_DECODER_ARMTHUMB
# Define to 1 if delta decoder is enabled.
DEFINES += HAVE_DECODER_DELTA
# Define to 1 if ia64 decoder is enabled.
DEFINES += HAVE_DECODER_IA64
# Define to 1 if lzma1 decoder is enabled.
DEFINES += HAVE_DECODER_LZMA1
# Define to 1 if lzma2 decoder is enabled.
DEFINES += HAVE_DECODER_LZMA2
# Define to 1 if powerpc decoder is enabled.
DEFINES += HAVE_DECODER_POWERPC
# Define to 1 if sparc decoder is enabled.
DEFINES += HAVE_DECODER_SPARC
# Define to 1 if x86 decoder is enabled.
DEFINES += HAVE_DECODER_X86
# Define to 1 if any of HAVE_ENCODER_foo have been defined.
DEFINES += HAVE_ENCODERS
# Define to 1 if arm encoder is enabled.
DEFINES += HAVE_ENCODER_ARM
# Define to 1 if armthumb encoder is enabled.
DEFINES += HAVE_ENCODER_ARMTHUMB
# Define to 1 if delta encoder is enabled.
DEFINES += HAVE_ENCODER_DELTA
# Define to 1 if ia64 encoder is enabled.
DEFINES += HAVE_ENCODER_IA64
# Define to 1 if lzma1 encoder is enabled.
DEFINES += HAVE_ENCODER_LZMA1
# Define to 1 if lzma2 encoder is enabled.
DEFINES += HAVE_ENCODER_LZMA2
# Define to 1 if powerpc encoder is enabled.
DEFINES += HAVE_ENCODER_POWERPC
# Define to 1 if sparc encoder is enabled.
DEFINES += HAVE_ENCODER_SPARC
# Define to 1 if x86 encoder is enabled.
DEFINES += HAVE_ENCODER_X86
# Define to 1 if you have the <inttypes.h> header file.
DEFINES += HAVE_INTTYPES_H
# Define to 1 if you have the <limits.h> header file.
DEFINES += HAVE_LIMITS_H
# Define to 1 to enable bt2 match finder.
DEFINES += HAVE_MF_BT2
# Define to 1 to enable bt3 match finder.
DEFINES += HAVE_MF_BT3
# Define to 1 to enable bt4 match finder.
DEFINES += HAVE_MF_BT4
# Define to 1 to enable hc3 match finder.
DEFINES += HAVE_MF_HC3
# Define to 1 to enable hc4 match finder.
DEFINES += HAVE_MF_HC4
# Define to 1 if stdbool.h conforms to C99.
DEFINES += HAVE_STDBOOL_H
# Define to 1 if you have the <stdint.h> header file.
DEFINES += HAVE_STDINT_H
# Define to 1 if you have the <stdlib.h> header file.
DEFINES += HAVE_STDLIB_H
# Define to 1 if you have the <string.h> header file.
DEFINES += HAVE_STRING_H
# Define to 1 or 0, depending whether the compiler supports simple visibility declarations.
DEFINES += HAVE_VISIBILITY=0
# Define to 1 if the system has the type `_Bool'.
DEFINES += HAVE__BOOL
# The size of `size_t', as computed by sizeof.
DEFINES += SIZEOF_SIZE_T=8
# Define to 1 if the system supports fast unaligned access to 16-bit and 32-bit integers.
DEFINES += TUKLIB_FAST_UNALIGNED_ACCESS

win32 {
    DEFINES += MYTHREAD_WIN95
    DEFINES += _CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_DEPRECATE
}
linux* {
    DEFINES += MYTHREAD_POSIX
}
macx {
    DEFINES += MYTHREAD_POSIX
}

形成005.lzma-5.2.7.pro文件:

QT += core

TEMPLATE = lib
CONFIG += c++17

DESTDIR = ../QGIS
CONFIG(debug, debug|release){
    MOC_DIR = ../build-QGIS/liblzma/Debug/moc
    RCC_DIR = ../build-QGIS/liblzma/Debug/rcc
    UI_DIR = ../build-QGIS/liblzma/Debug/ui
    OBJECTS_DIR = ../build-QGIS/liblzma/Debug/obj
}else{
    MOC_DIR = ../build-QGIS/liblzma/Release/moc
    RCC_DIR = ../build-QGIS/liblzma/Release/rcc
    UI_DIR = ../build-QGIS/liblzma/Release/ui
    OBJECTS_DIR = ../build-QGIS/liblzma/Release/obj
}

CONFIG(debug, debug|release){
    TARGET = liblzmad
}else{
    TARGET = liblzma
}

DEFINES -= UNICODE
DEFINES += DLL_EXPORT

# Prefix for symbols exported by tuklib_*.c files
DEFINES += TUKLIB_SYMBOL_PREFIX="lzma_"
# How many MiB of RAM to assume if the real amount cannot be determined.
DEFINES += ASSUME_RAM=128
# Define to 1 if crc32 integrity check is enabled.
DEFINES += HAVE_CHECK_CRC32
# Define to 1 if crc64 integrity check is enabled.
DEFINES += HAVE_CHECK_CRC64
# Define to 1 if sha256 integrity check is enabled.
DEFINES += HAVE_CHECK_SHA256
# Define to 1 if any of HAVE_DECODER_foo have been defined.
DEFINES += HAVE_DECODERS
# Define to 1 if arm decoder is enabled.
DEFINES += HAVE_DECODER_ARM
# Define to 1 if armthumb decoder is enabled.
DEFINES += HAVE_DECODER_ARMTHUMB
# Define to 1 if delta decoder is enabled.
DEFINES += HAVE_DECODER_DELTA
# Define to 1 if ia64 decoder is enabled.
DEFINES += HAVE_DECODER_IA64
# Define to 1 if lzma1 decoder is enabled.
DEFINES += HAVE_DECODER_LZMA1
# Define to 1 if lzma2 decoder is enabled.
DEFINES += HAVE_DECODER_LZMA2
# Define to 1 if powerpc decoder is enabled.
DEFINES += HAVE_DECODER_POWERPC
# Define to 1 if sparc decoder is enabled.
DEFINES += HAVE_DECODER_SPARC
# Define to 1 if x86 decoder is enabled.
DEFINES += HAVE_DECODER_X86
# Define to 1 if any of HAVE_ENCODER_foo have been defined.
DEFINES += HAVE_ENCODERS
# Define to 1 if arm encoder is enabled.
DEFINES += HAVE_ENCODER_ARM
# Define to 1 if armthumb encoder is enabled.
DEFINES += HAVE_ENCODER_ARMTHUMB
# Define to 1 if delta encoder is enabled.
DEFINES += HAVE_ENCODER_DELTA
# Define to 1 if ia64 encoder is enabled.
DEFINES += HAVE_ENCODER_IA64
# Define to 1 if lzma1 encoder is enabled.
DEFINES += HAVE_ENCODER_LZMA1
# Define to 1 if lzma2 encoder is enabled.
DEFINES += HAVE_ENCODER_LZMA2
# Define to 1 if powerpc encoder is enabled.
DEFINES += HAVE_ENCODER_POWERPC
# Define to 1 if sparc encoder is enabled.
DEFINES += HAVE_ENCODER_SPARC
# Define to 1 if x86 encoder is enabled.
DEFINES += HAVE_ENCODER_X86
# Define to 1 if you have the <inttypes.h> header file.
DEFINES += HAVE_INTTYPES_H
# Define to 1 if you have the <limits.h> header file.
DEFINES += HAVE_LIMITS_H
# Define to 1 to enable bt2 match finder.
DEFINES += HAVE_MF_BT2
# Define to 1 to enable bt3 match finder.
DEFINES += HAVE_MF_BT3
# Define to 1 to enable bt4 match finder.
DEFINES += HAVE_MF_BT4
# Define to 1 to enable hc3 match finder.
DEFINES += HAVE_MF_HC3
# Define to 1 to enable hc4 match finder.
DEFINES += HAVE_MF_HC4
# Define to 1 if stdbool.h conforms to C99.
DEFINES += HAVE_STDBOOL_H
# Define to 1 if you have the <stdint.h> header file.
DEFINES += HAVE_STDINT_H
# Define to 1 if you have the <stdlib.h> header file.
DEFINES += HAVE_STDLIB_H
# Define to 1 if you have the <string.h> header file.
DEFINES += HAVE_STRING_H
# Define to 1 or 0, depending whether the compiler supports simple visibility declarations.
DEFINES += HAVE_VISIBILITY=0
# Define to 1 if the system has the type `_Bool'.
DEFINES += HAVE__BOOL
# The size of `size_t', as computed by sizeof.
DEFINES += SIZEOF_SIZE_T=8
# Define to 1 if the system supports fast unaligned access to 16-bit and 32-bit integers.
DEFINES += TUKLIB_FAST_UNALIGNED_ACCESS

win32 {
    DEFINES += MYTHREAD_WIN95
    DEFINES += _CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_DEPRECATE
}
linux* {
    DEFINES += MYTHREAD_POSIX
}
macx {
    DEFINES += MYTHREAD_POSIX
}

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

#当前目录
INCLUDEPATH += ./ ./liblzma/api ./liblzma/common ./liblzma/check ./liblzma/lz \
            ./liblzma/rangecoder ./liblzma/lzma ./liblzma/delta ./liblzma/simple ./common

#头文件
HEADERS +=  ./common/mythread.h \
            ./common/sysdefs.h \
            ./common/tuklib_common.h \
            ./common/tuklib_config.h \
            ./common/tuklib_cpucores.h \
            ./common/tuklib_integer.h \
            ./common/tuklib_physmem.h \
            ./liblzma/api/lzma.h \
            ./liblzma/api/lzma/base.h \
            ./liblzma/api/lzma/bcj.h \
            ./liblzma/api/lzma/block.h \
            ./liblzma/api/lzma/check.h \
            ./liblzma/api/lzma/container.h \
            ./liblzma/api/lzma/delta.h \
            ./liblzma/api/lzma/filter.h \
            ./liblzma/api/lzma/hardware.h \
            ./liblzma/api/lzma/index.h \
            ./liblzma/api/lzma/index_hash.h \
            ./liblzma/api/lzma/lzma12.h \
            ./liblzma/api/lzma/stream_flags.h \
            ./liblzma/api/lzma/version.h \
            ./liblzma/api/lzma/vli.h \
            ./liblzma/check/check.h \
            ./liblzma/check/crc32_table_be.h \
            ./liblzma/check/crc32_table_le.h \
            ./liblzma/check/crc64_table_be.h \
            ./liblzma/check/crc64_table_le.h \
            ./liblzma/check/crc_macros.h \
            ./liblzma/common/alone_decoder.h \
            ./liblzma/common/block_buffer_encoder.h \
            ./liblzma/common/block_decoder.h \
            ./liblzma/common/block_encoder.h \
            ./liblzma/common/common.h \
            ./liblzma/common/easy_preset.h \
            ./liblzma/common/filter_common.h \
            ./liblzma/common/filter_decoder.h \
            ./liblzma/common/filter_encoder.h \
            ./liblzma/common/index.h \
            ./liblzma/common/index_encoder.h \
            ./liblzma/common/memcmplen.h \
            ./liblzma/common/outqueue.h \
            ./liblzma/common/stream_decoder.h \
            ./liblzma/common/stream_flags_common.h \
            ./liblzma/delta/delta_common.h \
            ./liblzma/delta/delta_decoder.h \
            ./liblzma/delta/delta_encoder.h \
            ./liblzma/delta/delta_private.h \
            ./liblzma/lz/lz_decoder.h \
            ./liblzma/lz/lz_encoder.h \
            ./liblzma/lz/lz_encoder_hash.h \
            ./liblzma/lz/lz_encoder_hash_table.h \
            ./liblzma/lzma/fastpos.h \
            ./liblzma/lzma/lzma2_decoder.h \
            ./liblzma/lzma/lzma2_encoder.h \
            ./liblzma/lzma/lzma_common.h \
            ./liblzma/lzma/lzma_decoder.h \
            ./liblzma/lzma/lzma_encoder.h \
            ./liblzma/lzma/lzma_encoder_private.h \
            ./liblzma/rangecoder/price.h \
            ./liblzma/rangecoder/range_common.h \
            ./liblzma/rangecoder/range_decoder.h \
            ./liblzma/rangecoder/range_encoder.h \
            ./liblzma/simple/simple_coder.h \
            ./liblzma/simple/simple_decoder.h \
            ./liblzma/simple/simple_encoder.h \
            ./liblzma/simple/simple_private.h

#源文件
SOURCES +=  ./common/tuklib_cpucores.c \
            ./common/tuklib_physmem.c \
            ./liblzma/check/check.c \
            ./liblzma/check/crc32_fast.c \
            ./liblzma/check/crc32_table.c \
            ./liblzma/check/crc64_fast.c \
            ./liblzma/check/crc64_table.c \
            ./liblzma/check/sha256.c \
            ./liblzma/common/alone_decoder.c \
            ./liblzma/common/alone_encoder.c \
            ./liblzma/common/auto_decoder.c \
            ./liblzma/common/block_buffer_decoder.c \
            ./liblzma/common/block_buffer_encoder.c \
            ./liblzma/common/block_decoder.c \
            ./liblzma/common/block_encoder.c \
            ./liblzma/common/block_header_decoder.c \
            ./liblzma/common/block_header_encoder.c \
            ./liblzma/common/block_util.c \
            ./liblzma/common/common.c \
            ./liblzma/common/easy_buffer_encoder.c \
            ./liblzma/common/easy_decoder_memusage.c \
            ./liblzma/common/easy_encoder.c \
            ./liblzma/common/easy_encoder_memusage.c \
            ./liblzma/common/easy_preset.c \
            ./liblzma/common/filter_buffer_decoder.c \
            ./liblzma/common/filter_buffer_encoder.c \
            ./liblzma/common/filter_common.c \
            ./liblzma/common/filter_decoder.c \
            ./liblzma/common/filter_encoder.c \
            ./liblzma/common/filter_flags_decoder.c \
            ./liblzma/common/filter_flags_encoder.c \
            ./liblzma/common/hardware_cputhreads.c \
            ./liblzma/common/hardware_physmem.c \
            ./liblzma/common/index.c \
            ./liblzma/common/index_decoder.c \
            ./liblzma/common/index_encoder.c \
            ./liblzma/common/index_hash.c \
            ./liblzma/common/outqueue.c \
            ./liblzma/common/stream_buffer_decoder.c \
            ./liblzma/common/stream_buffer_encoder.c \
            ./liblzma/common/stream_decoder.c \
            ./liblzma/common/stream_encoder.c \
            ./liblzma/common/stream_encoder_mt.c \
            ./liblzma/common/stream_flags_common.c \
            ./liblzma/common/stream_flags_decoder.c \
            ./liblzma/common/stream_flags_encoder.c \
            ./liblzma/common/vli_decoder.c \
            ./liblzma/common/vli_encoder.c \
            ./liblzma/common/vli_size.c \
            ./liblzma/delta/delta_common.c \
            ./liblzma/delta/delta_decoder.c \
            ./liblzma/delta/delta_encoder.c \
            ./liblzma/lz/lz_decoder.c \
            ./liblzma/lz/lz_encoder.c \
            ./liblzma/lz/lz_encoder_mf.c \
            ./liblzma/lzma/fastpos_table.c \
            ./liblzma/lzma/lzma2_decoder.c \
            ./liblzma/lzma/lzma2_encoder.c \
            ./liblzma/lzma/lzma_decoder.c \
            ./liblzma/lzma/lzma_encoder.c \
            ./liblzma/lzma/lzma_encoder_optimum_fast.c \
            ./liblzma/lzma/lzma_encoder_optimum_normal.c \
            ./liblzma/lzma/lzma_encoder_presets.c \
            ./liblzma/rangecoder/price_table.c \
            ./liblzma/simple/arm.c \
            ./liblzma/simple/armthumb.c \
            ./liblzma/simple/ia64.c \
            ./liblzma/simple/powerpc.c \
            ./liblzma/simple/simple_coder.c \
            ./liblzma/simple/simple_decoder.c \
            ./liblzma/simple/simple_encoder.c \
            ./liblzma/simple/sparc.c \
            ./liblzma/simple/x86.c

# Default rules for deployment.
#unix {
#    target.path = /usr/lib
#}
#!isEmpty(target.path): INSTALLS += target


五、编译实践

用QtCreator程序,打开005.lzma-5.2.7.pro文件:在这里插入图片描述
在windows下编译,形成:
在这里插入图片描述

在linux下编译,形成:
在这里插入图片描述
在macos下编译,形成:
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/341097.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

如何用AirServer进行手机投屏?,Airserver 永久激活注册码

AirServer一款投屏神器&#xff0c;可以帮你轻松地将iPhone、iPad投屏到Mac。是不是经常看到游戏主播用AirServer投屏&#xff1f;此外&#xff0c;AirServer也是视频Up主必备工具之一&#xff01;用来录制演示教程不错。除了实现单个手机投屏到电脑或荧幕。如果你有多画面投屏…

界面控件DevExpress ASP.NET Data Grid组件 - 可快速处理各类型数据!(一)

由DevExpress开发的快速且功能完整的ASP.NET Web Forms的Data Grid组件&#xff0c;从全面的数据塑造和数据过滤选项到十多个集成数据编辑器&#xff0c;该套件提供了帮助用户构建极佳数据所需的一些&#xff0c;没有限制&#xff01; P.S&#xff1a;DevExpress ASP.NET Web …

R303 指纹识别模块功能实现流程

1 基本通信流程 1.1 UART 命令包的处理过程 1.2 UART 数据包的发送过程 UART 传输数据包前&#xff0c;首先要接收到传输数据包的指令包&#xff0c;做好传输准备后发送成功应答包&#xff0c;最后才开始传输数据包。数据包主要包括&#xff1a;包头、设备地址、包标识、包长…

表单的总数据为什么可以写成一个空对象,不用具体的写表单中绑定的值,vue3

<el-form :model"form" label-width"120px"><el-form-item label"Activity name"><el-input v-model"form.name" /></el-form-item> </el-form> const form ref({})from为空对象 在v-model里写form…

最新数据传输安全难点解决方案(上)

在数据量激增和网络环境日益复杂的背景下&#xff0c;确保数据在传输过程中的安全性、效率和可靠性&#xff0c;已成为众多企业亟需解决的问题。镭速小编将带大家探讨数据传输安全所面临的主要挑战&#xff0c;并介绍一些前沿的数据传输安全技术和策略&#xff0c;以供企业参考…

RK3568笔记十一:mpp编解码

若该文为原创文章&#xff0c;转载请注明原文出处。 主要是想测试MPP的解码&#xff0c;为后续做测试。 一、环境 1、平台&#xff1a;rk3568 2、开发板:ATK-RK3568正点原子板子 3、环境&#xff1a;buildroot 二、编译 使用的是正点原子提供的虚拟机&#xff0c;搭建好环…

【cucumber】cucumber-reporting生成测试报告

原始的cucumber report 比较粗糙 我们可以通过cucumber-reporting 插件对报告进去优化 在pom.xml里面添加cuccumber-reporting 插件 <!-- 根据 cucumber json文件 美化测试报告--><dependency><groupId>net.masterthought</groupId><artifactId>…

【博士每天一篇论文-综述】Deep Echo State Network (DeepESN)_ A Brief Survey

阅读时间&#xff1a;2023-11-22 1 介绍 年份&#xff1a;2017 作者&#xff1a;C. Gallicchio 比萨大学计算机科学系终身教授助理教授&#xff0c;A. Micheli&#xff0c;比萨大学计算机科学系 期刊&#xff1a; ArXiv 引用量&#xff1a;68 这是两个大牛的论文&#xff0c;…

charles mac抓包unknown问题

第一步&#xff1a;mac上安装Charles后&#xff0c;mac安装证书&#xff1a; 第二步&#xff1a;mac上信任证书 第三步&#xff1a;手机上安装证书 安装提示&#xff1a;电脑上通过help–>SSLProxying–> Install Charles Root Ceriticate on a Mobile Device or Remote …

hadoop必记知识点(2)

6. hadoop集群计算的时候&#xff0c;什么是集群的主要瓶颈&#xff1f;展开说一下&#xff0c;生产遇到了什么问题&#xff1f; 在 Hadoop 集群进行计算时&#xff0c;可能会遇到多个瓶颈&#xff0c;但最主要的通常包括网络带宽、存储以及 CPU 处理能力。 网络带宽&#xf…

如何制作自己的实景中国视频地图?

让每一个人都有自己的地图&#xff01; 我们在《水经微图Web版1.5.0发布》一文中&#xff0c;提到了水经微图&#xff08;简称“微图”&#xff09;Web版新增了视频气泡的功能。 现在&#xff0c;我们为你分享一下如何基于此功能&#xff0c;制作一个属于自己的实景中国视频地…

Axios取消请求:AbortController

AbortController AbortController() 构造函数创建了一个新的 AbortController 实例。MDN官网给出了一个利用AbortController取消下载视频的例子。 核心逻辑是&#xff1a;利用AbortController接口的只读属性signal标记fetch请求&#xff1b;然后在需要取消请求的时候&#xff0…

【XR806开发板试用】系列之一 - Linux环境下Ubuntu完全开发流程

前言 为了让极术社区开发者体验搭载安谋科技STAR-MC1处理器的面向IoT领域的全志XR806开发板&#xff0c;极术社区联合全志在线开发者社区共同推出XR806开发板免费试用活动。 极术社区特准备了200块XR806开发板作为2022年社区新年活动&#xff0c;申请的人数有600多&#xff0c…

分布式websocket IM聊天系统相关问题问答【第九期】

前言 上期视频讲解了自己关于聊天系统的设计的时候出现了一些不一样的声音。不了解情况的可以看上上期视频。这期主要是讨论。IM聊天系统设计方案多。我的先说明一下自己的技术背景互相之间才能更好的理解。 本期对应视频 目前已经写的文章有。并且有对应视频版本。 git项目地…

线性代数的学习和整理23:用EXCEL和python 计算向量/矩阵的:内积/点积,外积/叉积

目录 1 乘法 1.1 标量乘法(中小学乘法) 1.1.1 乘法的定义 1.1.2 乘法符合的规律 1.2 向量乘法 1.2.1 向量&#xff1a;有方向和大小的对象 1.2.2 向量的标量乘法 1.2.3 常见的向量乘法及结果 1.2.4 向量的其他乘法及结果 1.2.5 向量的模长&#xff08;长度&#xff0…

安装向量数据库milvus可视化工具attu

使用docker安装的命令和简单就一个命令&#xff1a; docker run -p 8000:3000 -e MILVUS_URL{milvus server IP}:19530 zilliz/attu:v2.3.5sunyuhuasunyuhua-HKF-WXX:~/dockercom/milvus$ docker run -p 8000:3000 -e MILVUS_URL127.0.0.1:19530 zilliz/attu:latest yarn run…

扫地机器人(二分算法+贪心算法)

1. if(robot[i]-len<sweep)这个代码的意思是——如果机器人向左移动len个长度后&#xff0c;比现在sweep的位置&#xff08;现在已经覆盖的范围&#xff09;还要靠左&#xff0c;就是覆盖连续不起来&#xff0c;呢么这个len就是有问题的&#xff0c;退出函数&#xff0c;再…

微信小程序-03

小程序官方把 API 分为了如下 3 大类&#xff1a; 事件监听 API 特点&#xff1a;以 on 开头&#xff0c;用来监听某些事件的触发 举例&#xff1a;wx.onWindowResize(function callback) 监听窗口尺寸变化的事件 同步 API 特点1&#xff1a;以 Sync 结尾的 API 都是同步 API 特…

在全志H616核桃派上实现USB摄像头的OpenCV颜色检测

在给核桃派开发板用OpenCV读取图像并显示到pyqt5的窗口上并加入颜色检测功能&#xff0c;尝试将图像中所有蓝色的东西都用一个框标记出来。 颜色检测核心api 按照惯例&#xff0c;先要介绍一下opencv中常用的hsv像素格式。颜色还是那个颜色&#xff0c;只是描述颜色用的参数变…

【vscode】远程资源管理器自动登录服务器保姆级教程

远程资源管理器自动登录服务器 介绍如何配置本地生成rsa服务端添加rsa.pub配置config文件 介绍 vscode SSH 保存密码自动登录服务器 对比通过账号密码登录&#xff0c;自动连接能节约更多时间效率&#xff0c;且通过vim修改不容易发现一些换行或者引号导致的错误&#xff0c;v…