Discussion:
Building curl on windows with msys2
Morgan via curl-library
2021-05-03 10:29:19 UTC
Permalink
Hi All,

Hope this email finds you well.
I was wondering if someone could provide the steps to build libcurl on
windows with msys2 in 32 and 64 bits?
Ideally I would like to be able to libcurl.a on my own. File example can be
found at:
https://github.com/rwinlib/libcurl

Ideally if these steps could be published on:
https://curl.se/docs/install.html

Tht would be great.

Thank you in advance
Best regards,
Morgan
Daniel Stenberg via curl-library
2021-05-03 11:04:35 UTC
Permalink
Post by Morgan via curl-library
I was wondering if someone could provide the steps to build libcurl on
windows with msys2 in 32 and 64 bits?
What did you try?

I built curl on msys2 just a few weeks ago and it was as straight-forward as
anyone could wish for:

./configure
make
make install
--
/ daniel.haxx.se
| Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
E
Morgan via curl-library
2021-05-03 13:22:38 UTC
Permalink
Hi Daniel,
Thank you for the feedback.
I tried that after doing a :
git clone https://github.com/curl/curl.git
and it does not work. How do I build the github version?
Now if I download curl-7-76-1.zip in https://curl.se/download.html and
execute the command you gave me, it does work.
However I don't see the 32 bits and 64 bits version?
I see that there is a libcurl.a in curl-7.76.1\lib\.libs is that for 64
bits only ? (I am running MINGW64)
Do I have to do the same with MINGW32?
I believe that if I want to build with --with-openssl, I will have to build
openssl first and set the correct directory like
set OPENSSL_PATH=c:\openssl-1.0.2c
Sorry if my questions seem stupid, I am very new to all this.
Thank you
Best regards,
Morgan
Post by Daniel Stenberg via curl-library
Post by Morgan via curl-library
I was wondering if someone could provide the steps to build libcurl on
windows with msys2 in 32 and 64 bits?
What did you try?
I built curl on msys2 just a few weeks ago and it was as straight-forward as
./configure
make
make install
--
/ daniel.haxx.se
| Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://www.wolfssl.com/contact/
Daniel Stenberg via curl-library
2021-05-03 13:57:22 UTC
Permalink
Post by Morgan via curl-library
Thank you for the feedback.
git clone https://github.com/curl/curl.git
and it does not work. How do I build the github version?
"the github version" off git is not the release, that's a tagged development
version so it requires a few extra steps as mention in the GIT-INFO file in
the root directory of the checkout.

It would recommend getting a true release version if you want the slightly
easier route.
Post by Morgan via curl-library
Now if I download curl-7-76-1.zip in https://curl.se/download.html and
execute the command you gave me, it does work.
However I don't see the 32 bits and 64 bits version?
You build curl so you need to tell your compiler/configure the extra options
to cross-build into other versions. "CFLAGS=-m32 ./configure" would be the
simplest take I would guess at, but I don't actually know of it works that
easily on msys.

It's actually more of a system and compiler question than a curl one.
Post by Morgan via curl-library
I believe that if I want to build with --with-openssl, I will have to build
openssl first and set the correct directory like
set OPENSSL_PATH=c:\openssl-1.0.2c
Build openssl and install first, then use curls configure like:

./configure --with-ssl=[PATH prefix]
--
/ daniel.haxx.se
| Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquett
Morgan via curl-library
2021-05-03 15:18:54 UTC
Permalink
Thank you Daniel.
Best regards
Morgan
Post by Daniel Stenberg via curl-library
Post by Morgan via curl-library
Thank you for the feedback.
git clone https://github.com/curl/curl.git
and it does not work. How do I build the github version?
"the github version" off git is not the release, that's a tagged development
version so it requires a few extra steps as mention in the GIT-INFO file in
the root directory of the checkout.
It would recommend getting a true release version if you want the slightly
easier route.
Post by Morgan via curl-library
Now if I download curl-7-76-1.zip in https://curl.se/download.html and
execute the command you gave me, it does work.
However I don't see the 32 bits and 64 bits version?
You build curl so you need to tell your compiler/configure the extra options
to cross-build into other versions. "CFLAGS=-m32 ./configure" would be the
simplest take I would guess at, but I don't actually know of it works that
easily on msys.
It's actually more of a system and compiler question than a curl one.
Post by Morgan via curl-library
I believe that if I want to build with --with-openssl, I will have to
build
Post by Morgan via curl-library
openssl first and set the correct directory like
set OPENSSL_PATH=c:\openssl-1.0.2c
./configure --with-ssl=[PATH prefix]
--
/ daniel.haxx.se
| Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://www.wolfssl.com/contact/
Loading...