How do you compile OpenSSL for x64?

后端 未结 8 879
粉色の甜心
粉色の甜心 2020-12-03 01:48

After following the instructions in INSTALL.W64 I have two problems:

  • The code is still written to the \"out32\" folder. I need to be able to link to both 32-bi
8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 02:25

    If you're building in cygwin, you can use the following script, assume MSDEVPATH has already been set to your Visual Studio dir

     echo "Building x64 OpenSSL"
     # save the path of the x86 msdev
     MSDEVPATH_x86=$MSDEVPATH
     # and set a new var with x64 one
     MSDEVPATH_x64=`cygpath -u $MSDEVPATH/bin/x86_amd64`
    
     # now set vars with the several lib path for x64 in windows mode
     LIBPATH_AMD64=`cygpath -w $MSDEVPATH_x86/lib/amd64`
     LIBPATH_PLATFORM_x64=`cygpath -w $MSDEVPATH_x86/PlatformSDK/lib/x64`
     # and set the LIB env var that link looks at
     export LIB="$LIBPATH_AMD64;$LIBPATH_PLATFORM_x64"
    
     # the new path for nmake to look for cl, x64 at the start to override any other msdev that was set previously
     export PATH=$MSDEVPATH_x64:$PATH
    
     ./Configure VC-WIN64A zlib-dynamic --prefix=$OUT --with-zlib-include=zlib-$ZLIB_VERSION/include --with-zlib-lib=zlib-$ZLIB_VERSION/x64_lib
    
     # do the deed
     ms/do_win64a.bat
     $MSDEVPATH_x86/bin/nmake -f ms/ntdll.mak  ${1:-install}
    

提交回复
热议问题