Install mingw tools on linux:
sudo apt-get install mingw-w64
clone openssl repo:
git clone https://github.com/openssl/openssl.git
Configure openssl for cross compile:
./Configure --cross-compile-prefix=x86_64-w64-mingw32- mingw64
make
Install mingw tools on linux:
sudo apt-get install mingw-w64
clone openssl repo:
git clone https://github.com/openssl/openssl.git
Configure openssl for cross compile:
./Configure --cross-compile-prefix=x86_64-w64-mingw32- mingw64
make
Once the compile is done and there are no errors, , do a
make install
. The resulting files should be in/usr/lib/x86_64-w64-mingw32
Afterwards, the compiler should be able to use the libs and include files by default.
Use
-L/usr/lib/x86_64-w64-mingw32
if you are getting linker errors though it might indicate a faulty installation.