Clear questions and runnable code
get the best and fastest answer
Re^8: Can't call libcurl with Inline::C on Windowsby syphilis (Bishop)
|on Nov 20, 2019 at 12:30 UTC||Need Help??|
I note you use libcurl installed from MSYS2 other than win64 version, that's why you can build successfully I think
Yes, that probably makes it a bit simpler - certainly a lot simpler than the builds I did a couple of years ago against static libraries that I had built from source.
I finally solved the problem regarding the "loadable library and perl binaries" mismatch - and in so doing, I discovered that I had faced (and solved) the exact same problem when I built Net-Curl-0.37.
There's a line in the Makefile.PL:
That change then also brings about the need to patch Curl.xs:
I got rid of the overflow in conversion from 'long long unsigned int' to 'int' warning by patching Curl_multi.xsh:
though it doesn't seem to make any difference to the way that the test suite behaves .... and the test suite doesn't behave very well.
A lot of the tests fail or hang. And the examples scripts hang or crash - except for examples/04-share-threads.pl (which runs fine).
The Net-Curl-0.41 test suite covers much more than the Net-Curl-0.37 suite did. 0.37 passed all of its tests, and 0.41 still passes the same tests.
The problems are with the other tests in 0.41 (ie the ones that weren't in 0.37).
I've no idea how useful Net-Curl is on Windows - I think it's a good idea to stick with Inline::C if you can get it to do what you need.
I also built Net-Curl-0.41 with Strawberry Perl 126.96.36.199 - again, building against the MSYS2 libraries.
I get identical results with Strawberry Perl - which is to be expected.
Strawberry Perl's perl/bin/pkg-config.bat doesn't automatically find the Curl library, so I renamed it to pkg-config.bat_hide. With that done, the MSYS2 mingw64/pkg-config.exe gets used instead, and the Curl library is found.