curl / curl-for-win

Reproducible curl binaries for Linux, macOS and Windows
https://curl.se/windows/
MIT License
686 stars 207 forks source link

Cannot build libpsl on Windows #64

Closed zhcnyuyang closed 7 months ago

zhcnyuyang commented 7 months ago

I am using Windows11 system and compiling libcurl on it. When running cmake it requires libssh2 and libpsl. I succesfully compiled libssh2 and imported it into cmake. But when compiling cmake I met a trouble. I tried all the ways to compile it in their offical documation but none of them succeeded. There is no articles online to introduce how to compile it on Windows. So when you were building libcurl on Windows, how did you solve this problem? And is there any libpsl binaries which has finished compiling and can be directly used? Thanks very much.

zhcnyuyang commented 7 months ago

I got libpsl source code from here. And I tried the way of compiling in README.MSVC.md. However, doesn't work.

vszakats commented 7 months ago

I solved it by building libpsl manually (without using its build-systems). You can see it in the file libpsl.sh.

In the curl-for-win official downloads there is a libpsl.a that is usable as-is (for static linking), but this is for mingw-w64 and not compatible with MSVC.

zhcnyuyang commented 7 months ago

I solved it by building libpsl manually (without using its build-systems). You can see it in the file libpsl.sh.

In the curl-for-win official downloads there is a libpsl.a that is usable as-is (for static linking), but this is for mingw-w64 and not compatible with MSVC.

libpsl.sh? Where? After your replying, I still have some questions. First, what's the exact procedure of compile it on Mingw64? I generated the configure file according to its document but after I got the configure file, I got error when running ./configure command. And how to use the .a file? Treat it to be the same as .lib file?

vszakats commented 7 months ago

In this very repository we're discussing this. → https://github.com/curl/curl-for-win/blob/main/libpsl.sh

It doesn't use ./configure.

I suggest directing your questions to the libpsl project. In this project we're building curl.

zhcnyuyang commented 7 months ago

I solved it by building libpsl manually (without using its build-systems). You can see it in the file libpsl.sh.

In the curl-for-win official downloads there is a libpsl.a that is usable as-is (for static linking), but this is for mingw-w64 and not compatible with MSVC.

I said "I generated the configure file according to its document but after I got the configure file" means I used mingw64 in msys2.

vszakats commented 7 months ago

Yeah, but this isn't the libpsl project, and as mentioned, we don't use autotools to build libpsl. To get support for libpsl, please contact the libpsl project directly.

zhcnyuyang commented 7 months ago

Yeah, but this isn't the libpsl project, and as mentioned, we don't use autotools to build libpsl. To get support for libpsl, please contact the libpsl project directly.

Curl for win? What's the project?

vszakats commented 7 months ago

This project is building curl for Windows and other operating systems.

zhcnyuyang commented 7 months ago

This project is building curl for Windows and other operating systems.

What's the difference between it and curl?

zhcnyuyang commented 7 months ago

This project is building curl for Windows and other operating systems.

And I entered project, didn't see any code and binaries. How to use this project? And what's the purpose of this project? Download code and compile them? Work with the code you download previously? I want to get a tutorial guide of it.

vszakats commented 7 months ago

No difference in context of libpsl.

zhcnyuyang commented 7 months ago

Too much new thing I've got puzzled...

vszakats commented 7 months ago

These are shell scripts to download and build curl and its dependencies. Most would not use this project directly but download the binaries it produced and run or link them to their projects (see https://curl.se/windows).

This isn't actively supported, but you can also do your own builds by running the scripts yourself, locally, or via CI. See the CI entry points and _build.sh / _build-runner.sh for hints on how to.

zhcnyuyang commented 7 months ago

These are shell scripts to download and build curl and its dependencies. Most would not use this project directly but download the binaries it produced and run or link them to their projects (see https://curl.se/windows).

This isn't actively supported, but you can also do your own builds by running the scripts yourself, locally, or via CI. See the CI entry points and _build.sh / _build-runner.sh for hints on how to.

CI? What's that?

zhcnyuyang commented 7 months ago

These are shell scripts to download and build curl and its dependencies. Most would not use this project directly but download the binaries it produced and run or link them to their projects (see https://curl.se/windows).

This isn't actively supported, but you can also do your own builds by running the scripts yourself, locally, or via CI. See the CI entry points and _build.sh / _build-runner.sh for hints on how to.

Okay, I see.

zhcnyuyang commented 7 months ago

These are shell scripts to download and build curl and its dependencies. Most would not use this project directly but download the binaries it produced and run or link them to their projects (see https://curl.se/windows).

This isn't actively supported, but you can also do your own builds by running the scripts yourself, locally, or via CI. See the CI entry points and _build.sh / _build-runner.sh for hints on how to.

And I have the last question is that in curl-for-win, to build the whole project, which one is the entrance? And What's my work after running the script?

vszakats commented 7 months ago

CI? What's that?

AppVeyor CI, GitHub Actions: Continuous Integration hosts.