3rd.botan
1、HOME
1、官网:https://botan.randombit.net/ Win下 编译步骤:https://botan.randombit.net/handbook/building.html#on-windows,是如下4步: $ python configure.py --cc=msvc --os=windows $ nmake $ botan-test.exe $ nmake install 2、ZC:我在家的笔记本上安装的是 vs2017x64 2.1、nmake的最后的几行输出信息为 如图"01_namke.png"所示(貌似和 SHH的vs2017x86执行该命令后的最后输出是一样的。使用 vs2017x86时使用的命令行是自己拼凑的x64的环境变量"path"&"include"&"lib"。) 2.2、命令"nmake install"执行之后的输出为 如图"02_nmakeinstall.png"所示
1、vs2017x64 的 "x64Native Tools Command Prompt for VS 2017"中,执行下面的命令: F:\IDE\CPP_3rd\zclxy-botan-2.12.1\zclxy-botan-2.12.1>python configure.py --cc=msvc --os=windows --with-debug-info --debug-mode ... ... F:\IDE\CPP_3rd\zclxy-botan-2.12.1\zclxy-botan-2.12.1> 1.1、ZC:找到"x64Native Tools Command Prompt for VS 2017"的位置是: "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2017\Visual Studio Tools\VC\x64 Native Tools Command Prompt for VS 2017" 它的属性,显示为“%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"”
2、SHH
2.1、_____ZC_编译botan.txt
1、官网的编译步骤 在 “https://botan.randombit.net/handbook/building.html#on-windows”中,使用vs的话 是这几条命令: $ python configure.py --cc=msvc --os=windows $ nmake $ botan-test.exe $ nmake install ZC:配置文件中的一些参数 在这里查看:https://botan.randombit.net/handbook/building.html#configure-script-options ZC: python configure.py --cc=msvc --os=windows --with-debug-info ZC: python configure.py --cc=msvc --os=windows --with-debug-info --debug-mode 2、官网:“https://botan.randombit.net/”,代码我是在这里下载的:“https://github.com/randombit/botan” 3、我使用 vs2017编译,我装的vs2017是32位的,然后发现 它的命令行 都是设置的 32位的文件路径,所以直接用这个命令行是不行的... 3.1、CMD显示全部环境变量命令:set 3.2、主要使用的 环境变量就是 "path"、"include"、"lib"。 我的做法:打开vs2017的命令行,然后得到这3个环境变量的值,然后改成 x64的文件路径,再在新的CMD中设置x64的3个环境变量值。 (ZC:环境变量"libpath"的值 在新的CMD中设置了之后貌似没起作用... 于是这里 就没有提到它) 3.3、LINK : fatal error LNK1181: 无法打开输入文件“crypt32.lib”: 环境变量"LIB"中添加:“C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\SDK\ScopeCppSDK\SDK\lib;” 4、编译成功之后,结果如图:编译成功_01.png 5、
2.2、__ZC_环境变量.txt
1、比较环境变量的"path",得到如下 18个不同的项 "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCPackages"; "C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.1"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Roslyn"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools"; "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\"; "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\"; "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86"; "C:\Program Files (x86)\Windows Kits\10\bin\x86"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\\MSBuild\15.0\bin"; "C:\Windows\Microsoft.NET\Framework\v4.0.30319"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja"; 1.1、改成 x64的形式: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCPackages"; "C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.1"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Roslyn"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools"; "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\"; "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\"; "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64"; "C:\Program Files (x86)\Windows Kits\10\bin\x64"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\\MSBuild\15.0\bin"; "C:\Windows\Microsoft.NET\Framework\v4.0.30319"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja"; 1.2、合并成一行之后: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64";"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCPackages";"C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.1";"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow";"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer";"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Roslyn";"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools";"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\";"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\";"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\";"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64";"C:\Program Files (x86)\Windows Kits\10\bin\x64";"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\\MSBuild\15.0\bin";"C:\Windows\Microsoft.NET\Framework\v4.0.30319";"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\";"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\";"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin";"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja"; 2、include C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\ATLMFC\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt 3、lib C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\lib\x86;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x86;C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x86; 3.1、改成 x64的形式:(最后面 还加了一个) C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\atlmfc\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\SDK\ScopeCppSDK\SDK\lib; 4、 5、
2.3、path_z.txt
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCPackages"; "C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.1"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Roslyn"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Performance Tools"; "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\"; "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\"; "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64"; "C:\Program Files (x86)\Windows Kits\10\bin\x64"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\\MSBuild\15.0\bin"; "C:\Windows\Microsoft.NET\Framework\v4.0.30319"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"; "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja";
3、20191120 在SH 想编译 x86版本
3.1、运行配置文件 出现问题:
D:\Documents\Downloads\botan\botan-2.12.1>python configure.py --cc=msvc --os=win dows INFO: configure.py invoked with options "--cc=msvc --os=windows" INFO: Configuring to build Botan 2.12.1 (revision unknown) INFO: Running under 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MS C v.1916 64 bit (AMD64)] INFO: Autodetected platform information: OS="Windows" machine="AMD64" proc="I ntel64 Family 6 Model 158 Stepping 10, GenuineIntel" INFO: Guessing target processor is a x86_64 (use --cpu to set) INFO: Canonicalized CPU target AMD64 to x86_64 INFO: Auto-detected compiler version 19.16 INFO: Auto-detected compiler arch x86_32 ERROR: Configured target is x86_64 but compiler probe indicates x86_32 D:\Documents\Downloads\botan\botan-2.12.1>
ZC:现在想先 之前(上面) 折腾SH的机子的配置,估计也是 报了这个问题的缘故
3.2、上面也贴了 配置文件的 参数的网址:https://botan.randombit.net/handbook/building.html#configure-script-options,可以看到 参数cpu 可以指定CPU的架构,于是 配置命令就变成了:(加上了本文上面的 调试信息参数)
python configure.py --cc=msvc --os=windows --with-debug-info --debug-mode --cpu=x86_32
然后 就可以直接使用 SH的32位的vs2017的"VS 2017的开发人员命令提示符"直接跑上面的命令了,
然后命令 nmake
然后命令 nmake install
然后命令 botan-test.exe ZC:这次 这个放在了最后面,∵它会卡在那边无法退出程序,于是先安装 安装完后再测试
4、
5、