with mingw we can compile 3rd party project for windows on linux.
compile openssl for example:
参考: OpenSSL for Windows
setup cross compile environment.
sudo apt-get install mingw-w64 binutils-mingw-w64download openssl source code
git clone https://github.com/openssl/openssl.gitcross compile with mingw
cd openssl
./Configure —cross-compile-prefix=i686-w64-mingw32- mingw64 no-asm shared —prefix=xxx
make
make install├── bin
│ ├── c_rehash
│ ├── libeay32.dll
│ ├── openssl.exe
│ └── ssleay32.dll
├── include
│ └── openssl
├── lib
│ ├── engines
│ ├── libcrypto.a
│ ├── libcrypto.dll.a
│ ├── libssl.a
│ ├── libssl.dll.a
│ └── pkgconfig
└── ssl├── certs ├── man ├── misc ├── openssl.cnf └── private