• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            牽著老婆滿街逛

            嚴以律己,寬以待人. 三思而后行.
            GMail/GTalk: yanglinbo#google.com;
            MSN/Email: tx7do#yahoo.com.cn;
            QQ: 3 0 3 3 9 6 9 2 0 .

            Building OpenSSL for Visual Studio

            轉載自:http://developer.covenanteyes.com/building-openssl-for-visual-studio/

            Building OpenSSL for Visual Studio on Windows is mostly straight-forward, but it has some quirks. I’ll document the results of my wrestling here so that future attempts will be less painful.

            What you need

            You need to install…

            Setting up for the build

            Unzip3 the OpenSSL source code into two different folders, one for the 32-bit build and one for the 64-bit build4. So, for example, you might end up with C:\openssl-src-32 and C:\openssl-src-64.

            Building the 32-bit static libraries

            1. Open the Visual Studio Command Prompt (2010)5.
            2. cd to your OpenSSL source folder for 32-bit (e.g. cd C:\openssl-src-32).
            3. Run the following: 6
            perl Configure VC-WIN32 --prefix=C:\Build-OpenSSL-VC-32
            ms
            \do_ms
            nmake 
            -f ms\nt.mak 
            nmake 
            -f ms\nt.mak install

            Your outputs will be in C:\Build-OpenSSL-VC-32.

            Building the 32-bit static libraries with debug symbols

            These steps will embed the debug symbols directly into the .lib files. Don’t expect to see any .pdb files.

            1. Open the Visual Studio Command Prompt (2010).
            2. cd to your OpenSSL source folder for 32-bit (e.g. cd C:\openssl-src-32).
            3. Run the following:
              perl Configure debug-VC-WIN32 --prefix=C:\Build-OpenSSL-VC-32-dbg
              ms
              \do_ms
            4. In a text editor (like Notepad), open ms\nt.mak and replace all occurrences of /Zi with /Z7. There should be three replacements.7
            5. Run the following:
              nmake -f ms\nt.mak       
              nmake 
              -f ms\nt.mak install

            Your outputs will be in C:\Build-OpenSSL-VC-32-dbg. Make sure you rename them to something likelibeay32-debug.lib and ssleay32-debug.lib.

            Building the 64-bit static libraries

            1. Open the Visual Studio x64 Win64 Command Prompt (2010) (in the Start menu).
            2. cd to your OpenSSL source folder for 64-bit (e.g. cd C:\openssl-src-64).
            3. Run the following:
              perl Configure VC-WIN64A --prefix=C:\Build-OpenSSL-VC-64
              ms
              \do_win64a
              nmake 
              -f ms\nt.mak   
              nmake 
              -f ms\nt.mak install

            Your outputs will be in C:\Build-OpenSSL-VC-64.

            Note: The outputs of the 64-bit build are still named libeay32.lib and ssleay32.lib. You’ll have to rename them more sensibly yourself.

            Building the 64-bit static libraries with debug symbols

            These steps will embed the debug symbols directly into the .lib files. Don’t expect to see any .pdb files.

            1. Open the Visual Studio x64 Win64 Command Prompt (2010).
            2. cd to your OpenSSL source folder for 64-bit (e.g. cd C:\openssl-src-64).
            3. Run the following:
              perl Configure debug-VC-WIN64A --prefix=C:\Build-OpenSSL-VC-64-dbg
              ms
              \do_win64a
            4. In a text editor (like Notepad), open ms\nt.mak and replace all occurrences of /Zi with /Z7 except on the line starting with ASM. There should be two replacements. 8
            5. Run the following:
              nmake -f ms\nt.mak
              nmake 
              -f ms\nt.mak install

            Your outputs will be in C:\Build-OpenSSL-VC-64-dbg. Make sure you rename them to something likelibeay64-debug.lib and ssleay64-debug.lib.

            What not to do

            I tried every method under the sun to get a Windows build of OpenSSL that would link against Visual Studio projects. I learned a great deal along the way. Here’s what I learned not to do:

            • Don’t blindly follow the Windows 32-bit/64-bit installation instructions provided in the OpenSSL source folder. Get guidance online.
            • Don’t build OpenSSL in Cygwin. It’s easy. It won’t link against Visual Studio.
            • Don’t build OpenSSL in MSYS or MinGW. It’s hard. It won’t link against Visual Studio.
            • Don’t try to use NASM like the Windows installation instructions mention. It’s not necessary for Visual Studio builds. (It only supports 32-bit anyway.)
            • Strawberry Perl doesn’t always work in these weird configurations. ActivePerl seemed more stable.
            • Don’t try to build 32-bit and 64-bit OpenSSL in the same folder. The first build will leave artifacts that will mess up the second build. (Running a clean isn’t enough, apparently.)
            • Don’t try to build 32-bit OpenSSL inside of Visual Studio’s 64-bit command prompt and vice versa. It doesn’t work.

            References

            These were very helpful places:

            Footnotes:
            1. Strawberry Perl has been less reliable historically, but I see the comments for success stories.
            2. OpenSSL version 1.0.1c was the latest at the time of writing.
            37-zip is good for unzipping .tar.gz files on Windows. It’s a two-step process.
            4. OpenSSL’s build scripts are not clever enough to handle two different platform builds in sequence. Separate platform builds must start from scratch.
            5. You can find it somewhere in the Start menu.
            6. Using ms\\ntdll.mak will build the shared library instead.
            7. The /Zi option works, but it’s hard to find the right .pdb file without specifying more options. For the sake of simplicity, the /Z7 option just embeds all the debug symbols into the .lib files. Read more here.
            8. For the 64-bit build, Visual Studio uses MASM (ml64.exe) to compile assembly code. According to MASM’s documentation, the /Z7 option is not supported.

            posted on 2016-06-16 18:23 楊粼波 閱讀(530) 評論(0)  編輯 收藏 引用

            亚洲国产精品久久66| 国产精品视频久久久| 久久99精品久久只有精品| 亚洲国产精品嫩草影院久久| 欧美一区二区久久精品| 久久久噜噜噜久久熟女AA片| 久久99国产精品二区不卡| 国内精品久久久久久久coent| 精品久久久久久中文字幕| 久久久久久综合一区中文字幕 | 久久夜色精品国产亚洲av| 久久影视综合亚洲| 香蕉久久夜色精品升级完成| 久久精品国产亚洲AV无码偷窥| 成人国内精品久久久久一区| 2021国内久久精品| 99久久伊人精品综合观看| 欧洲人妻丰满av无码久久不卡| 国产精品无码久久四虎| 99久久婷婷免费国产综合精品| 亚洲欧美国产精品专区久久| 国内精品久久久久久久久电影网| 久久久久久九九99精品| 欧美激情精品久久久久久久九九九| 亚洲精品白浆高清久久久久久| 99久久国产综合精品网成人影院| 亚洲伊人久久大香线蕉综合图片| 久久久久久毛片免费看| 久久99精品国产99久久6男男| 国产一区二区久久久| 人人狠狠综合久久亚洲婷婷| 国产精品久久影院| 国产婷婷成人久久Av免费高清| 精品久久久久中文字幕一区| 2021国产成人精品久久| 久久久精品人妻一区二区三区四 | 久久青青草原亚洲av无码| 久久99精品国产麻豆宅宅| 国产精品久久久久AV福利动漫 | 久久久久97国产精华液好用吗| 国产高清美女一级a毛片久久w|