guanzhi / GmSSL

支持国密SM2/SM3/SM4/SM9/SSL的密码工具箱
http://gmssl.org
Apache License 2.0
5.19k stars 1.67k forks source link

windows 下 vs2010 nmake 报错 #1618

Open MenXiPeng opened 10 months ago

MenXiPeng commented 10 months ago

cmake 没有错误,编译信息如下: -- Building for: NMake Makefiles -- The C compiler identification is MSVC 16.0.30319.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: D:/vs2010/VC/bin/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- ENABLE_SM3_XMSS is ON -- ENABLE_SHA2 is ON -- ENABLE_AES is ON -- Looking for getentropy -- Looking for getentropy - not found -- CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS -- Configuring done (2.3s) -- Generating done (0.9s) -- Build files have been written to: C:/cygwin64/home/Zilot/GmSSL-master/build

nmake 出现一下错误:

[ 1%] Building C object CMakeFiles/gmssl.dir/src/version.c.obj cl: 命令行 warning D9002 :忽略未知选项“/utf-8” version.c [ 1%] Building C object CMakeFiles/gmssl.dir/src/debug.c.obj cl: 命令行 warning D9002 :忽略未知选项“/utf-8” debug.c C:\cygwin64\home\Zilot\GmSSL-master\src\debug.c(65) : error C2065: “func”: 未声明的标识符 C:\cygwin64\home\Zilot\GmSSL-master\src\debug.c(77) : warning C4018: “<”: 有符号/无符号不匹配 NMAKE : fatal error U1077: “"C:\Program Files\CMake\bin\cmake.exe"”: 返回代码“0x2” Stop. NMAKE : fatal error U1077: “D:\vs2010\VC\BIN\nmake.exe”: 返回代码“0x2” Stop. NMAKE : fatal error U1077: “D:\vs2010\VC\BIN\nmake.exe”: 返回代码“0x2” Stop.

HokiyaJostar commented 7 months ago

我也报错0x2

bg9cxn commented 7 months ago

我也是报错: Windows 10 vs2022

C:\Users\lxp\source\repos\GmSSL\src\x509_crl.c(45): warning C4018: “>=”: 有符号/无符号不匹配 C:\Users\lxp\source\repos\GmSSL\src\x509_crl.c(55): warning C4018: “<”: 有符号/无符号不匹配 [ 26%] Building C object CMakeFiles/gmssl.dir/src/x509_new.c.obj x509_new.c [ 27%] Building C object CMakeFiles/gmssl.dir/src/cms.c.obj cms.c [ 27%] Building C object CMakeFiles/gmssl.dir/src/socket.c.obj socket.c [ 28%] Building C object CMakeFiles/gmssl.dir/src/tls.c.obj tls.c C:\Users\lxp\source\repos\GmSSL\src\tls.c(2324): warning C4013: “fcntl”未定义;假设外部返回 int C:\Users\lxp\source\repos\GmSSL\src\tls.c(2324): error C2065: “F_GETFL”: 未声明的标识符 C:\Users\lxp\source\repos\GmSSL\src\tls.c(2329): error C2065: “O_NONBLOCK”: 未声明的标识符 NMAKE : fatal error U1077: “"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E cmake_cl_compile_depends --dep-file=CMakeFiles\gmssl.dir\src\tls.c.obj.d --working-dir=C:\Users\lxp\source\repos\GmSSL\build --filter-prefix="注意: 包含文件: " -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1439~1.335\bin\Hostx86\x86\cl.exe @C:\Users\lxp\AppData\Local\Temp\nm942E.tmp”: 返回代码“0x2” Stop. NMAKE : fatal error U1077: “"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX86\x86\nmake.exe" -s -f CMakeFiles\gmssl.dir\build.make /nologo -SL CMakeFiles\gmssl.dir\build”: 返回代码“0x2” Stop. NMAKE : fatal error U1077: “"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX86\x86\nmake.exe" -s -f CMakeFiles\Makefile2 /nologo -S all”: 返回代码“0x2”