Skip to main content

Cross Compiling OPENSSL from WSL/Linux to Windows

Flags for the different binaries need to be overwritten when generating the Makefile with Configure

https://github.com/openssl/openssl?tab=readme-ov-file

https://gist.github.com/udnaan/80c5ad125fc4702309b9

./Configure mingw shared --cross-compile-prefix=x86_64-w64-mingw32- --prefix=${WORKSPACE}

make
make install

This.. is. probably.

So the above was from a MUCHguide betterbut wayat toleast domy itBELOW above.thing HOLY. THank you

 USE THE ABOVE NOT THIS JANK THING I MADEcompiles...

./Configure --static -static --prefix=/opt/Cross-openssl/win64 --openssldir=/opt/Cross-openssl/win64 mingw64 CC=x86_64-w64-mingw32-gcc RC=x86_64-w64-mingw32-windres AR=x86_64-w64-mingw32-ar RANLIB=x86_64-w64-mingw32-ranlib

Ref:

https://github.com/openssl/openssl/issues/9922