c++ - 在 Windows 上编译 LZ4 压缩库

标签 c++ windows makefile mingw lz4

我正在尝试使用 LZ4 compression library在 Visual Studio 2013 中使用 C++ 项目。我需要为其构建 .dll 文件,以便在项目中链接它。我正在尝试使用 mingw 通过 make 文件构建它,但这会引发令人不快的错误。导航到存储库的基本目录并运行 mingw32-make.exe 会出现以下错误输出:

process_begin: CreateProcess(NULL, uname, ...) failed.
The filename, directory name, or volume label syntax is incorrect.
Makefile:72: recipe for target 'lz4programs' failed
mingw32-make: *** [lz4programs] Error 1

我不太熟悉在 Windows 上编译 make 文件,并且很难找出导致错误的原因。此外,考虑到这个压缩库的流行程度,我觉得有些奇怪,我在网上找不到任何关于为 Windows 编译它的信息。非常感谢任何帮助编译这个东西的帮助。

最佳答案

我能够使用 CMake 和 cmake_unofficial 文件夹中的 CMakeLists.txt 文件来编译库和 lz4 可执行文件。

解决方案是编译库的静态版本。如果您想要一个 dll 版本,如果静态库不够用,您应该能够尝试使用 Visual Studio 设置来获取 dll。

关于c++ - 在 Windows 上编译 LZ4 压缩库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31733538/

相关文章:

c++ - 在对可执行文件大小没有严格限制的情况下,为什么在 Visual C++ 9 中更喜欢/Ob1 而不是/Ob2?

c++ - 构造关联容器

Windows 内核级全局临界区

makefile - 将Makefile中的长依赖项分成几行

linux - 是什么原因导致 "/usr/bin/ld: -f may not be used without -shared"以及如何修复它

c++ - 什么时候会发生内存泄漏?

c++ - 使用 Windows 密码学函数 C++ 对哈希进行签名

java - Android(附件模式)和 Windows PC(主机)之间的 USB 通信

linux - Windows SVN 服务器和 Linux SVN 客户端 - 有风险吗?