我正在尝试构建 openssl 库。我从 GitHub https://github.com/openssl/openssl克隆了一个 repo
现在使用 Visual Studio 2013 的“命令行”。这个命令行:
我使用下一个命令: cd C:\Programs\openssl - 转到带有 openssl repo 的文件夹
perl Configure VC-WIN64A --prefix=C:\Programs\openssl-build - 实际上,我不知道这个命令究竟是做什么的,但所有手册都说它需要。此命令有下一个输出
并且“是的,我有‘Perl’,当然我安装了‘Perl’”
And the next (and the last) command, which I write ts just simple "nmake". The last becouse the output of this command has some "fatal errors", which doesn't let me continue installation
As you see, the main error is "fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'". As I know, the parametr machine type can be supplied in properties of Solution in Microsoft Visual Studio GUI, but how to set it from command line I have no idea, and openssl doesn't represented by Microsoft Visual Studio Solution, which can be open by MS Visual Studio.
So, maybe somebody knows how to set this property from command line, or, maybe, this error doesn't depends from this and somebody know how to solve this problem.
I hope for your help. Please, guys, second day I try to solve this, you are my last chance!!
Here is what I did. First, I opened a command prompt for 64-bit builds:
$ cl Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for x64
Then, I downloaded the current 1.1 release tarball. There is no reason to mess with development versions unless you are actually developing OpenSSL and you are capable of debugging problems in development versions.
$ curl -O https://www.openssl.org/source/openssl-1.1.0e.tar.gz
$ tar xvf openssl-1.1.0e.tar.gz
$ cd openssl-1.1.0e
At this point, I read INSTALL
which I recommend you also do instead of saying "I have no idea what this command exectly do". Once you read INSTALL
, you will know what the command actually does.
$ perl Configure --prefix=%TEMP%\openssl VC-WIN64A
$ nmake
This gave me no errors, so I went ahead and issued
$ nmake test
which gave me
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1 Copyright (C) Microsoft Corporation. All rights reserved. set SRCTOP=. set BLDTOP=. set PERL=C:\opt\perl\5.24.1\bin\perl.exe set OPENSSL_DEBUG_MEMORY=on "C:\opt\perl\5.24.1\bin\perl.exe" ".\test\run_tests.pl" test\recipes\01-test_abort.t ............ ok test\recipes\01-test_sanity.t ........... ok test\recipes\01-test_symbol_presence.t .. ok ... test\recipes\90-test_sslapi.t ........... ok test\recipes\90-test_threads.t .......... ok test\recipes\90-test_v3name.t ........... ok All tests successful. 文件 = 91,测试 = 433,100 挂钟秒(0.66 usr + 0.27 sys = 0.92 CPU) 结果:通过
在这一点上,我很确定nmake install
也可以工作,但我不想替换我系统上的任何内容。
您没有 Perl 或与编程相关的问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句