cpr icon indicating copy to clipboard operation
cpr copied to clipboard

Static library - zlib.dll is created instead of zlib.lib

Open dmitri-fm opened this issue 1 year ago • 2 comments

Description

Zlib is built as static library, but the library has .dll extension

Example/How to Reproduce

Configure/Generate with CMake as static library, open solution in Visual Studio s1

Possible Fix

No response

Where did you get it from?

GitHub (branch e.g. master)

Additional Context/Your Environment

  • OS: Windows 10
  • Version: https://github.com/libcpr/cpr/releases/tag/1.10.5

dmitri-fm avatar Sep 13 '24 21:09 dmitri-fm

@vergol thanks for reporting. I will try to look into it as soon as possible.

COM8 avatar Sep 20 '24 15:09 COM8

I can not reproduce this. When I do cmake .. -DBUILD_SHARED_LIBS=OFF and then open the VS solution I get: image

Could it be, that you first build cpr as shared (including zlib) and then you switched to static without deleting the build directory before that?

In theory this should be handled by the following code: https://github.com/libcpr/cpr/blob/master/cmake/zlib_external.cmake#L18

COM8 avatar Sep 22 '24 15:09 COM8

Closing for no response

COM8 avatar Nov 12 '24 19:11 COM8