How do you compile OpenSSL for x64?

后端 未结 8 904
粉色の甜心
粉色の甜心 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

    I solved the problem this way, using the 1.0.1c source:

    Add this block to util/pl/VC-32.pl, just before the $o='\\'; line.

    if ($debug)
        {
        $ssl .= 'd';
        $crypto .= 'd';
        }
    

    Add this block to util/pl/VC-32.pl, just before the if ($debug) line.

    if ($FLAVOR =~ /WIN64/)
        {
        $out_def =~ s/32/64/;
        $tmp_def =~ s/32/64/;
        $inc_def =~ s/32/64/;
        }
    

    Then build all varieties:

    setenv /x86 /release
    perl Configure VC-WIN32  --prefix=build -DUNICODE -D_UNICODE
    ms\do_ms
    nmake -f ms\ntdll.mak
    
    setenv /x64 /release
    perl Configure VC-WIN64A --prefix=build
    ms\do_win64a.bat
    nmake -f ms\ntdll.mak
    
    setenv /x86 /debug
    perl Configure debug-VC-WIN32  --prefix=build -DUNICODE -D_UNICODE
    ms\do_ms
    move /y ms\libeay32.def ms\libeay32d.def
    move /y ms\ssleay32.def ms\ssleay32d.def
    nmake -f ms\ntdll.mak
    
    setenv /x64 /debug
    perl Configure debug-VC-WIN64A --prefix=build
    ms\do_win64a.bat
    move /y ms\libeay32.def ms\libeay32d.def
    move /y ms\ssleay32.def ms\ssleay32d.def
    nmake -f ms\ntdll.mak
    

提交回复
热议问题