Search code examples
c++windowsmakefilemingwlz4

Compiling LZ4 compression library on Windows


I'm trying to use the LZ4 compression library with a C++ project in Visual Studio 2013. I need to build the .dll files for it so I can link it in the project. I'm trying to use mingw to build it with the make file, but that is throwing unpleasant errors. Navigating to the base directory of the repository and running mingw32-make.exe gives the following error output:

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

I'm not overly familiar with compiling make files on Windows, and am having difficulty with figuring out what's causing the error. Additionally, in something that I find rather odd given how popular this compression library is, I cannot find any information online about compiling it for Windows. Any assistance in getting this thing to compile would be greatly appreciated.


Solution

  • I was able to use CMake with the CMakeLists.txt file in the cmake_unofficial folder to compile the library and the lz4 executable.

    The solution is compiling a static version of the library. If you want a dll version, you should be able to experiment with the Visual Studio settings to get the dll if the static library isn't sufficient.