我尝试在 Windows 10 64 位上设置 OpenSSL,遵循到目前为止的说明,在安装 Visual Studio 后,我尝试使用 Visual c++ 2008 命令提示符在 openssl 目录中进行 nmake,但出现以下错误:
"C:\Strawberry\perl\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "crypto\include\internal\bn_conf.h.in" > crypto\include\internal\bn_conf.h
"C:\Strawberry\perl\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "crypto\include\internal\dso_conf.h.in" > crypto\include\internal\dso_conf.h
"C:\Strawberry\perl\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\opensslconf.h.in" > include\openssl\opensslconf.h
ias -d debug -ocrypto\aes\aes-ia64.obj "crypto\aes\aes-ia64.asm"
'ias' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'ias' : return code '0x1'
Stop.
如果我尝试编译 32 位版本,此错误会有所不同。这会导致引用 NASM 时出现错误,|我尝试安装但没有成功。
有人可以提出解决方案吗?
感谢您花时间阅读我的问题。
最佳答案
该问题与长文件名无关。 @Sebastian 没有安装 ias。他不应该使用ias无论如何。
您需要nasm如果您希望 OpenSSL 利用汇编语言优化。
如果没有,您可以将 no-asm
传递给 Configure
。
取决于您的操作系统
on Windows (only pick one of the targets for configuration):
$ perl Configure { VC-WIN32 | VC-WIN64A | VC-WIN64I | VC-CE }
您需要VC-WIN32
或VC-WIN64A
。这是how I did it 。 1.0.1g
是该帖子发布时的当前版本。
- 下载最新的源代码发行版
- 启动适用的 VC 命令提示符
- (可选)获取 zlib,构建 DLL
- 获取 nasm 并构建可执行文件
如果您确实要求 zlib,请将目录添加到 INCLUDE 和 LIB:
C:\…\openssl-1.0.1g> set INCLUDE=%INCLUDE%;C:\…\zlib-1.2.8 C:\…\openssl-1.0.1g> set LIB=%LIB%;C:\…\zlib-1.2.8
运行
C:\…\openssl-1.0.1g> perl 配置VC-WIN64A zlib-dynamic --openssldir=C:\opt\OpenSSL
运行
C:\…\openssl-1.0.1g> ms\do_win64a
运行
C:\…\openssl-1.0.1g> nmake -f ms\ntdll.mak
cd 到out32dll,然后运行..\ms\test
确保所有测试均通过:
安装方法如下:
C:\…\openssl-1.0.1g\out32dll> cd .. C:\…\openssl-1.0.1g> nmake -f ms\ntdll.mak install
PS:如果您正在构建与 Strawberry Perl 一起使用的 OpenSSL,请注意 perl.exe
将使用 gcc 进行编译,因此,您应该使用 Strawberry Perl 附带的 gcc 来构建OpenSSL。
如果您正在构建用于将使用 MSVC 工具链构建的项目的库,则可以忽略此注释。
关于c++ - OpenSSL:Nmake fatal error U1077: 'ias':返回代码 '0x1',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38572948/