OpenSSL compilation on Windows

Source: Internet
Author: User
The following article is a record of dragonking from the OpenSSL Professional Forum in China. Before the article, let me talk about some issues about using OpenSSL in VC. First, the system prompts that the command cannot be found, in this case, you should add the two lib files generated by OpenSSL in project --> setting --> Link (it is best to add the generated lib and DLL to the Lib folder of Vc ). If the file sequence cannot be located during running, find the DLL with the same name as the two DLL files you get in system32 and overwrite it with a new one. A few days ago, in order to provide you with a new version of OpenSSL, I re-compiled OpenSSL and compared several compilation methods. I 'd like to write this article for a brief introduction and hope it will help you.
The compiled version is 0.9.6h, And the compiler uses VC ++ 6.0. According to its instructions, I performed the following commands and operations:
1. Install ActivePerl-5.6.1.629-MSWin32-x86-multi-thread. pass smoothly!
2. open the console program, run the Perl configure VC-WIN32 command in the directory after OpenSSL decompression, note, be sure to execute the command in this directory, otherwise the configure file cannot be found, of course, you can also specify the complete configure file path. Successfully passed.
3. According to OpenSSL help instructions, run the MS/do_masm (and MS _/do_ms) commands in the decompressed directory.
4. configure the VC environment variables. I will go to the vc98/bin directory under the VC directory under the same console program, execute the vcvars32 Batch Processing Command, and set the VC environment variables, then go to the root directory of the OpenSSL decompression package.
Note: When I run vcvars32 for the first time, the error is: Out of environment space, which is generated because your MS-DOS environment variable is not allocated enough memory, this can be solved through the following methods:
A. Click Start and run.
B. Enter sysedit and press enter to run the program.
C. Multiple windows will appear. Select the config. sys window.
D. If a shell = Statement exists, enter REM before it to comment out the statement.
E. if the statement does not exist, enter shell = C:/command. COM/E: 4096/P. Make sure that the statement is entered from the first position in the first line.
F. Save and exit the computer and restart the computer.
After solving the problem as described above, you can directly perform Step 1 After restarting the computer.
5. Execute nmake-f ms/NTDLL. Mak in the OpenSSL unzip directory. If there is no error, the compilation will be completed. The output file is in out32dll, including the executable file of the application, two lib files, and two DLL files.

According to the OpenSSL instructions, I have made two kinds of compilation that cannot be implemented. I have always added the ASM assembly language compiler, but I have never. That is, I executed the do_masm or do_ms commands in step 3, in terms of time, the former is about 3 minutes (my computer is configured with tuinseryang 1.2 and the memory is 256 SDRM), and the latter is about 6 minutes.
Then, I used a compilation method provided by a third party. This method automatically configures the V virtual C Project connection configuration project of each OpenSSL module, and then compiles the project, which is very slow, it takes at least 20 minutes, but the advantage is that you can make it clearer for a project. I will not talk about the compilation process. You can refer to the relevant documents. Reference from:

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.