Build OpenSSl on Windows

  • Download required OpenSSL version and extract
    • Note: p4api 2023.x uses OpenSSL 1.0.2t, click to download this version
  • Follow the instruction shipping with OpenSSL
    1. Open file INSTALL.W64 in the root folder
    2. Install Stawberry Perl if not yet (do NOT use ActivateState Perl)
    3. Install NASM if not yet
      1. Need add envitonment varial path mannually for it
    4. Use Visual Studio Developer Command Prompt with administrative privileges
      1. NOTE: Use the right one (we use x64 version here)

Use commands in the prompt:

cd /d <OpenSSL source root path>
perl Configure VC-WIN64A no-shared –prefix=<TargetPath>

  • Follow the instruction and complete the rest steps
    1. Hint: The last step is testing build result, it will tell you whether the build result is correct