open_ssl build

環境:winxp x32

0. If you yet to have MinGW, read to learn how to install it.

1. Download Perl from ActiveState site: . Choose version that match your Windows. MSI installer is recommended, unless you are so fluent in Windows and don’t mind spending time with little tweaks like adding PATH, etc

2. Run the MSI installer and point path to C:developtoolsperl . You may choose different path, but that’s what on my machine.

3. Having installed with Perl, now let’s fetch OpenSSL: (the latest version of OpenSSL 0.9.8 at the time of writing). I wouldn’t recommend chasing after the version 1.0 for now.

4. Extract openssl to C:developtools and you will obtain directory C:developtoolsopenssl-0.9.8n . Get inside it.

5. Before you start building anything, take note that the macro OPENSSL_IMPLEMENT_GLOBAL causes fatal errors. Find it inside the files openssl-0.9.8ne_os2.h , openssl-0.9.8nincludeopenssle_os2.h and openssl-0.9.8noutincopenssle_os2.h . Find the macro’s definition and change

static type _hide_##name


/* static type _hide_##name */ type _hide_##name

6. Now let’s build shared & static versions of OpenSSL with a single command (you are now inside C:developtoolsopenssl-0.9.8n):

msmingw32.bat shared

Navigate to YouTube and have some snack. It may take 15-20 mins to finish building.

7. When building is finished, you can copy outincopenssl to your mingwinclude directory. You also can copy generated *.a and *.dll files to mingwlib directory and the *.dll to mingwbin directory. If you hate copying, remember to make use of -I and -L flags to appropriate folders when building with MinGW.

Building & installation of OpenSSL is done.


你的電子郵件位址並不會被公開。 必要欄位標記為 *