jpbarrette / curlpp

C++ wrapper around libcURL
http://www.curlpp.org
1.68k stars 360 forks source link

fix issue #169 #171

Open brunotl opened 2 months ago

brunotl commented 2 months ago

Remove reference to deprecated CURLOPT_CLOSEPOLICY and allow to build with CURL_NO_OLDIES defined

m5k8 commented 2 months ago

CURLOPT_CLOSEPOLICY gives me compilation error:

curlpp/include/curlpp/Options.hpp:311:74: error: invalid conversion from ‘int’ to ‘CURLoption’ [-fpermissive]
  311 |         typedef curlpp::OptionTrait<curl_closepolicy, CURLOPT_CLOSEPOLICY> ClosePolicy;
      |                                                                          ^
      |                                                                          |
      |                                                                          int

So I added temporarily explicit cast, but maybe removing this option (this pull request) would be cleaner.

-       typedef curlpp::OptionTrait<curl_closepolicy, CURLOPT_CLOSEPOLICY> ClosePolicy;
+       typedef curlpp::OptionTrait<curl_closepolicy, (CURLoption)CURLOPT_CLOSEPOLICY> ClosePolicy;
brunotl commented 2 months ago

CURLOPT_CLOSEPOLICY gives me compilation error:

curlpp/include/curlpp/Options.hpp:311:74: error: invalid conversion from ‘int’ to ‘CURLoption’ [-fpermissive]
  311 |         typedef curlpp::OptionTrait<curl_closepolicy, CURLOPT_CLOSEPOLICY> ClosePolicy;
      |                                                                          ^
      |                                                                          |
      |                                                                          int

So I added temporarily explicit cast, but maybe removing this option (this pull request) would be cleaner.

-       typedef curlpp::OptionTrait<curl_closepolicy, CURLOPT_CLOSEPOLICY> ClosePolicy;
+       typedef curlpp::OptionTrait<curl_closepolicy, (CURLoption)CURLOPT_CLOSEPOLICY> ClosePolicy;

this PR is made to fix that ....

m5k8 commented 2 months ago

Yes, I know, that's why I'm putting my comment under this PR. I just upvoted it.

creekorful commented 3 weeks ago

Hello there,

Debian maintainer of the curlpp package here. We have faced build issues too since the latest libcurl update. While I do have backported a patch to make sure the package is still building I would love to see that PR included into a new release.

@jpbarrette Any chance this could be done? This library is really helpful for many.

Thank you for your work!

Cheers

sim590 commented 3 weeks ago

I will comment here to support the merge of this PR as my project doesn't build anymore since the change in libcurl. Hopefully, this will be merged soon!

Even though the CI check fails. It seems to be broken though as it fails during execution of some python script which is not related to this PR.