[英]Getting an error building static libcurl VS2019
First I make nmake work:首先我让 nmake 工作:
set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.28.29812\bin\Hostx64\x86
then I git clone https://github.com/curl/curl.git --depth=1
然后我
git clone https://github.com/curl/curl.git --depth=1
Then I run buildconf.bat
all seems fine.然后我运行
buildconf.bat
一切似乎都很好。
then I go to winbuild and run nmake /f Makefile.vc mode=static
and the build fails with the following error:然后我 go 来 winbuild 并运行
nmake /f Makefile.vc mode=static
并且构建失败并出现以下错误:
configuration name: libcurl-vc-x64-release-static-ipv6-sspi-schannel
cl /O2 /DNDEBUG /MD /DCURL_STATICLIB /I. /I ../lib /I../include /nologo /W4 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES /DUSE_IPV6 /DUSE_WINDOWS_SSPI /DUSE_SCHANNEL /Fo"..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-lib/altsvc.obj" ..\lib\altsvc.c
altsvc.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\windows.h(167): fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.28.29812\bin\Hostx64\x86\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.28.29812\bin\Hostx64\x86\nmake.exe"' : return code '0x2'
Stop.
Is my nmake installed wrong?我的nmake安装错了吗?
If your ultimate goal is to "Get a static library compiled with a local cl compiler", I suggest you try the "vcpkg".如果您的最终目标是“获得使用本地 cl 编译器编译的 static 库”,我建议您尝试“vcpkg”。
All you have to do is "vcpkg install curl".您所要做的就是“vcpkg install curl”。 It will download the source code and compiled locally.
它将下载源代码并在本地编译。 :)
:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.