libcpr / cpr

C++ Requests: Curl for People, a spiritual port of Python Requests.
https://docs.libcpr.org/
Other
6.29k stars 903 forks source link

Missing .dll when compile with CMake on Windows #1049

Closed caslama16 closed 1 month ago

caslama16 commented 1 month ago

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

COM8 commented 1 month ago

@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 commented 1 month ago

Closing for no response.

ZaytsNick commented 3 weeks ago

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

nisooom commented 1 week ago

yes i am having the same issue, plz reopen.

COM8 commented 1 week ago

@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.