首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在Windows764位上构建OpenSSL时遇到问题

在Windows764位上构建OpenSSL时遇到问题
EN

Stack Overflow用户
提问于 2017-11-03 11:31:20
回答 2查看 2.9K关注 0票数 7

我试图为一个工作项目在Windows7上构建OpenSSL,但我遇到了麻烦。

安装说明中说,这样做很简单:

代码语言:javascript
运行
复制
Quick Start
-----------

If you want to just get on with it, do:

on Windows (only pick one of the targets for configuration):

$ perl Configure { VC-WIN32 | VC-WIN64A | VC-WIN64I | VC-CE }
$ nmake
$ nmake test
$ nmake install

我能够运行perl配置VC-WIN64A,没有问题。然而,当我尝试运行nmake时,我得到了以下输出:

代码语言:javascript
运行
复制
>C:\Users\jget952\Downloads\openssl-1.1.0f>"C:\Program Files (x86)\Microsoft >Visual Studio 14.0\VC\bin\amd64\nmake.exe"
>
>Microsoft (R) Program Maintenance Utility Version 14.00.24225.1
>Copyright (C) Microsoft Corporation.  All rights reserved.
>
>"C:\Program Files (x86)\Microsoft Visual Studio 
>14.0\VC\bin\amd64\nmake.exe" depend && "C:\Program Files (x86)\Microsoft Visual >Studio 14.0\VC\bin\amd64\nmake.exe" _all
>
>Microsoft (R) Program Maintenance Utility Version 14.00.24225.1
>Copyright (C) Microsoft Corporation.  All rights reserved.
>
>
>Microsoft (R) Program Maintenance Utility Version 14.00.24225.1
>Copyright (C) Microsoft Corporation.  All rights reserved.
>
>cl  /I "." /I "crypto\include" /I "include" -DOPENSSL_USE_APPLINK -
>DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC >-DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOP
>ENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM ->DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM ->DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM "-DENGIN
>ESDIR=\"C:\\Program Files\\OpenSSL\\lib\\engines-1_1\"" "->DOPENSSLDIR=\"C:\\Program Files\\Common Files\\SSL\"" -W3 -wd4090 -Gs0 -GF -Gy ->nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D
>_CRT_SECURE_NO_DEPRECATE -DUNICODE -D_UNICODE /MD /O2 /Zi /Fdossl_static -c >/Focrypto\aes\aes_ige.obj "crypto\aes\aes_ige.c"
>aes_ige.c
>C:\Users\jget952\Downloads\openssl-1.1.0f\e_os.h(200): fatal error C1083: >Cannot >open include file: 'winsock2.h': No such file or directory
>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio >14.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
>Stop.
>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio >14.0\VC\bin\amd64\nmake.exe"' : return code '0x2'
>Stop.
>
>C:\Users\jget952\Downloads\openssl-1.1.0f>
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-11-05 20:48:13

因为我使用的是普通命令提示符,而不是visual命令提示符,所以nmake无法找到它所需的所有库。

票数 9
EN

Stack Overflow用户

发布于 2019-08-04 14:59:57

你必须使用VC环境。您必须在visual安装中找到vcvarsall.bat

安装了VS 2019年和VC:

代码语言:javascript
运行
复制
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
nmake
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47094763

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档