Yuki's profile幽悠森林PhotosBlogLists Tools Help

Blog


    8/30/2007

    win32下openssl的编译

    win32下openssl的编译,"fatal error c1083:cannot open include file 'windows.h',no such file file or directory","NMAKE : fatal error U1077: 'ml' : return code '0x1' Stop."
     
    前些天试验了一下openssl在win32环境下的编译,按照INSTALL.W32的编译安装方法进行,遇到了一些不是问题的问题,简单记录下来:)希望对编译出问题的朋友有所帮助。
     
    环境描述:
    WinXP sp2,VC++6.0,NASM0.98.39,openssl-0.9.8e,ActivePerl-5.8.8.822-MSWin32-x86-280952
    其中VC++6.0安装在D盘,NASM可以从官方下载我直接解压缩到C:\NASM-0.98.39,openssl解压到C:\openssl-0.9.8e,ActivePerl安装到C:\Perl。
     
    注意事项:
    首先在环境变量path中增加了C:\Perl\bin;c:\NASM-0.98.39;D:\Microsoft Visual Studio\VC98\Bin;D:\Microsoft Visual Studio\Common\MSDev98\Bin
    添加完毕就不会出现诸如perl、nmake命令无效之类的问题了。如"NMAKE : fatal error U1077: 'ml' : return code '0x1' Stop."之类。
    另外在编译过程中会出现不能打开包含文件的错误,如"fatal error c1083:cannot open include file 'windows.h',no such file file or directory",为此层尝试修改过系统变量的path,无效,最终的解决办法很简单,将所有需要的直接拷贝到openssl-0.9.8e文件夹下就可以了,为了方便我直接将D:\Microsoft Visual Studio\VC98\Include下和D:\Microsoft Visual Studio\VC98\Lib下的所有文件拷贝到了c:\openssl-0.9.8e下,嘿嘿。
     
    准备完毕就可以开始了:)
     
    开始编译:
    开始:)
    步骤·1:perl Configure VC-WIN32 --prefix=c:/some/openssl/dir   其中c:/some/openssl/dir是你要安装openssl的目标文件夹。
    步骤·2:ms\do_nasm
    步骤·3:nmake -f ms\ntdll.mak
    步骤·4:nmake -f ms\ntdll.mak test
    步骤·5:nmake -f ms\ntdll.mak install
    ok 编译安装结束
     

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.
    Yuki Meng has turned off comments on this page.

    Trackbacks

    The trackback URL for this entry is:
    http://yysl.spaces.live.com/blog/cns!13A4BAAF65AA7B07!648.trak
    Weblogs that reference this entry
    • None