0. Cross Compiling - From Linux to Windows binary

🔹 Fixing "openssl-mingw-w64 not found" & Missing OpenSSL Headers in MinGW

Step Command Description
Verify If OpenSSL Is Installed ls /usr/x86_64-w64-mingw32/include/openssl/ Check if OpenSSL headers exist for MinGW. If missing, proceed to installation.
Install OpenSSL Development Headers for Linux (Temporary Fix) sudo apt install libssl-dev Installs OpenSSL for Linux but not for MinGW. Needed only for Linux compilation.
Download OpenSSL Source wget https://www.openssl.org/source/openssl-3.0.0.tar.gz && tar -xvzf openssl-3.0.0.tar.gz && cd openssl-3.0.0 Download and extract OpenSSL 3.0 source for manual installation.
Build OpenSSL for MinGW ./Configure mingw64 --cross-compile-prefix=x86_64-w64-mingw32- && make && sudo make install Compile OpenSSL specifically for MinGW. Installs to /usr/local/ssl.
Use the Correct Include Paths x86_64-w64-mingw32-g++ -o loader.exe mal.cpp -I/usr/local/ssl/include -L/usr/local/ssl/lib -lssl -lcrypto Ensure the correct OpenSSL headers are used in the MinGW compilation.
Final Check ls /usr/local/ssl/include/openssl/ Verify OpenSSL headers are installed. If present, compilation should work!