Search code examples
c++cmakemakefilemingwmingw-w64

How to build libcpr/cpr static library using mingw?


I'm trying to build libcpr/cpr on Windows with Mingw64 and the output is always a libcpr.dll libcurl-d.dll libzlib.dll file in the ./lib folder.

How can make the build provide a lib file instead of dll files?


Solution

  • Use CMake flag -DBUILD_SHARED_LIBS:BOOL=OFF to build static library files (*.a).