cpr icon indicating copy to clipboard operation
cpr copied to clipboard

Missing .dll when compile with CMake on Windows

Open caslama16 opened this issue 2 years ago • 5 comments

Description

I have a CMake project, where I need to use cpr. I used same steps, as you mentioned but when the project was compiled and I ran it, the error said that cpr.dll was missing. What should I do?

Example/How to Reproduce

  1. Copy steps which should be used in CMake
  2. Build the project
  3. Run it

Possible Fix

No response

Where did you get it from?

GitHub (branch e.g. master)

Additional Context/Your Environment

  • OS: Windows
  • Version: 3b15fa82ea74739b574d705fea44959b58142eb8

caslama16 avatar May 04 '24 09:05 caslama16

@caslama16 welcome! Here is an end-to-end example for using cpr inside CMake: https://github.com/libcpr/example-cmake-fetch-content

If you still have problems with it, please consider sharing more information like the error log output, an example for me to reproduce, ... Else I can only guess what is going wrong and I waste a lot of time.

COM8 avatar May 06 '24 04:05 COM8

Closing for no response.

COM8 avatar May 15 '24 16:05 COM8

fc15c778-c836-471f-b297-c6d21e4b8b85 trying to include the library cpr: Code execution cannot continue because the system did not detect cpr.dll https://github.com/ZaytsNick/dev-skillbox-module30.git

ZaytsNick avatar Jun 03 '24 17:06 ZaytsNick

yes i am having the same issue, plz reopen.

nishumbh avatar Jun 15 '24 17:06 nishumbh

@nisooom these lines might help: https://github.com/libcpr/example-cmake-fetch-content/blob/d99dfed29be9e1e3e9100b5b5abd714f701f7fbe/CMakeLists.txt#L25-L28

Other than that, I can not help you if you do not provide context or a small example application for me to take a look at.

COM8 avatar Jun 16 '24 05:06 COM8