Skip to content

configure: link -lcrypt32 instead of -lm for wolfSSL on Windows - #22251

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:am-wolfssl-m-windows
Closed

configure: link -lcrypt32 instead of -lm for wolfSSL on Windows#22251
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:am-wolfssl-m-windows

Conversation

@vszakats

@vszakats vszakats commented Jul 2, 2026

Copy link
Copy Markdown
Member

Syncing it with CMake/FindWolfSSL.

-lm is not needed on Windows. As of mingw-w64 14.0.0 it's offered as
a dummy library; in such case it wasn't causing an actual issue.
-lcryp32 is necessary when linking wolfSSL statically.

Ref: #22249

@vszakats vszakats added build TLS Windows Windows-specific labels Jul 2, 2026
@vszakats vszakats changed the title configure: for wolfSSL incude -lcrypt32 instead of -lm on Windows configure: for wolfSSL include -lcrypt32 instead of -lm on Windows Jul 2, 2026
@vszakats vszakats changed the title configure: for wolfSSL include -lcrypt32 instead of -lm on Windows configure: for wolfSSL link -lcrypt32 instead of -lm on Windows Jul 2, 2026
@vszakats
vszakats force-pushed the am-wolfssl-m-windows branch from c08d80c to 9899002 Compare July 2, 2026 22:41
@jay

jay commented Jul 2, 2026

Copy link
Copy Markdown
Member

how does this link it if it just takes away -lm ?

@jay

jay commented Jul 2, 2026

Copy link
Copy Markdown
Member

nm got your update

@vszakats

vszakats commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

how does this link it if it just takes away -lm ?

I was busy posting, while I forgot to git push the final patch!

@jay jay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this is an improvement regardless of if it fixes the reported issue

@vszakats vszakats changed the title configure: for wolfSSL link -lcrypt32 instead of -lm on Windows configure: link -lcrypt32 instead of -lm for wolfSSL on Windows Jul 2, 2026
@vszakats vszakats closed this in 0fff69d Jul 2, 2026
vszakats added a commit that referenced this pull request Jul 2, 2026
Also:
- whitespace tidy-up.
- tried building with MSYS2 wolfSSL, but still not compatible with curl.
  Ref: https://packages.msys2.org/base/mingw-w64-wolfssl
  Ref: #22251

Follow-up to 923db35 #18116

Closes #22252
@vszakats
vszakats deleted the am-wolfssl-m-windows branch July 2, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build TLS Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

2 participants