Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 如何解决与使用VCPKG安装GMP相关的问题?_C++_Visual Studio_Libraries_Build Error_Vcpkg - Fatal编程技术网

C++ 如何解决与使用VCPKG安装GMP相关的问题?

C++ 如何解决与使用VCPKG安装GMP相关的问题?,c++,visual-studio,libraries,build-error,vcpkg,C++,Visual Studio,Libraries,Build Error,Vcpkg,当我尝试使用VCPKG for visual studio安装GMP时,会出现以下错误: ./vcpkg install gmp Computing installation plan... The following packages will be built and installed: gmp[core]:x86-windows Detecting compiler hash for triplet x86-windows... Starting package 1/1:

当我尝试使用VCPKG for visual studio安装GMP时,会出现以下错误:

    ./vcpkg install gmp
Computing installation plan...
The following packages will be built and installed:
    gmp[core]:x86-windows
Detecting compiler hash for triplet x86-windows...
Starting package 1/1: gmp:x86-windows
Building package gmp[core]:x86-windows...
Could not locate cached archive: C:\Users\utente\AppData\Local\vcpkg\archives\ae\aee4cb498b812554294e4bbc47b9469351282935.zip
-- Using cached C:/Users/utente/Documents/Visual Studio 2019/vcpkg/downloads/ShiftMediaProject-gmp-e140dfc8668e96d7e56cbd46467945adcc6b3cc4.tar.gz
-- Cleaning sources at C:/Users/utente/Documents/Visual Studio 2019/vcpkg/buildtrees/gmp/src/adcc6b3cc4-2b6258d695.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/utente/Documents/Visual Studio 2019/vcpkg/downloads/ShiftMediaProject-gmp-e140dfc8668e96d7e56cbd46467945adcc6b3cc4.tar.gz
-- Applying patch vs.build.patch
-- Applying patch runtime.patch
-- Applying patch prefix.patch
-- Using source at C:/Users/utente/Documents/Visual Studio 2019/vcpkg/buildtrees/gmp/src/adcc6b3cc4-2b6258d695.clean
-- Building SMP/libgmp.sln for Release
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:72 (message):
    Command failed: msbuild "C:/Users/utente/Documents/Visual Studio 2019/vcpkg/buildtrees/gmp/x86-windows-rel/adcc6b3cc4-2b6258d695.clean/SMP/libgmp.sln" /p:Configuration=ReleaseDLL /p:UseEnv=True /t:Rebuild /p:Platform=x86 /p:PlatformToolset=v142 /p:VCPkgLocalAppDataDisabled=true /p:UseIntelMKL=No /p:WindowsTargetPlatformVersion=10.0.18362.0 /p:VcpkgTriplet=x86-windows "/p:VcpkgCurrentInstalledDir=C:/Users/utente/Documents/Visual Studio 2019/vcpkg/installed/x86-windows" /p:VcpkgManifestInstall=false /m "/p:ForceImportBeforeCppTargets=C:/Users/utente/Documents/Visual Studio 2019/vcpkg/scripts/buildsystems/msbuild/vcpkg.targets" /p:VcpkgApplocalDeps=false
    Working Directory: C:/Users/utente/Documents/Visual Studio 2019/vcpkg/buildtrees/gmp/x86-windows-rel/adcc6b3cc4-2b6258d695.clean
    Error code: 1
    See logs for more information:
      C:\Users\utente\Documents\Visual Studio 2019\vcpkg\buildtrees\gmp\build-x86-windows-rel-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_install_msbuild.cmake:162 (vcpkg_execute_required_process)
  ports/gmp/portfile.cmake:48 (vcpkg_install_msbuild)
  scripts/ports.cmake:79 (include)


Error: Building package gmp:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: gmp:x86-windows
  Vcpkg version: 2020.06.15-nohash
我试图在另一台电脑上安装GMP,但它给出了相同的错误,我也尝试卸载并重新安装
重新安装visual studio和vcpkg,但没有任何更改。

首先,我建议您将
vcpkg
更新到最新版本

如果不起作用,请检查Visual Studio的语言设置是否为英语,如果不是,您可以在Visual Studio中选择
Tools->Options->Environment->International Settings
并设置
English

最后,如果问题仍然无法解决,请向我显示
C:\Users\utene\Documents\visualstudio 2019\vcpkg\buildtrees\gmp\build-x86-windows-rel-out.log的内容

此外,您还可以参考此了解更多信息