Error in triplet x64 windows unable to find a valid visual studio instance

Describe the bug A clear and concise description of what the bug is. When using vcpkg install, an error occurred: in triplet x64-windows: Unable to find a valid Visual Studio instance Could not loc...

@JackBoosY I’ve got the required components from your list installed.

{
  "version": "1.0",
  "components": [
    "Microsoft.VisualStudio.Component.CoreEditor",
    "Microsoft.VisualStudio.Workload.CoreEditor",
    "Microsoft.VisualStudio.Component.Roslyn.Compiler",
    "Microsoft.Component.MSBuild",
    "Microsoft.VisualStudio.Component.Static.Analysis.Tools",
    "Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
    "Microsoft.VisualStudio.Component.PortableLibrary",
    "Microsoft.Net.Component.4.6.1.SDK",
    "Microsoft.Net.Component.4.6.1.TargetingPack",
    "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
    "Microsoft.Component.ClickOnce",
    "Microsoft.VisualStudio.Component.SQL.CLR",
    "Microsoft.VisualStudio.Component.VisualStudioData",
    "Microsoft.VisualStudio.Component.TextTemplating",
    "Microsoft.VisualStudio.Component.ManagedDesktop.Core",
    "Microsoft.Net.Component.4.5.TargetingPack",
    "Microsoft.Net.Component.4.5.2.TargetingPack",
    "Microsoft.VisualStudio.Component.Debugger.JustInTime",
    "Microsoft.VisualStudio.Component.NuGet",
    "Microsoft.VisualStudio.Component.FSharp",
    "Microsoft.Net.Core.Component.SDK.2.1",
    "Microsoft.NetCore.ComponentGroup.DevelopmentTools.2.1",
    "Microsoft.VisualStudio.Component.IISExpress",
    "Microsoft.VisualStudio.Component.TypeScript.3.1",
    "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions",
    "Microsoft.VisualStudio.Component.JavaScript.TypeScript",
    "Component.WebSocket",
    "Microsoft.VisualStudio.Component.JavaScript.Diagnostics",
    "Component.Microsoft.VisualStudio.RazorExtension",
    "Microsoft.VisualStudio.Component.SQL.ADAL",
    "Microsoft.VisualStudio.Component.SQL.NCLI",
    "Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime",
    "Microsoft.VisualStudio.Component.Common.Azure.Tools",
    "Microsoft.VisualStudio.Component.SQL.CMDUtils",
    "Microsoft.VisualStudio.Component.SQL.SSDT",
    "Microsoft.VisualStudio.Component.SQL.DataSources",
    "Component.Microsoft.Web.LibraryManager",
    "Microsoft.VisualStudio.ComponentGroup.Web",
    "Microsoft.VisualStudio.Component.DockerTools.BuildTools",
    "Microsoft.VisualStudio.Component.DockerTools",
    "Microsoft.VisualStudio.Component.VC.CoreIde",
    "Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
    "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core",
    "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
    "Microsoft.VisualStudio.Component.Graphics.Win81",
    "Microsoft.VisualStudio.Component.Graphics.Tools",
    "Microsoft.VisualStudio.Component.VC.DiagnosticTools",
    "Microsoft.VisualStudio.Component.VC.ATL",
    "Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest",
    "Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest",
    "Microsoft.Component.VC.Runtime.UCRTSDK",
    "Microsoft.VisualStudio.Component.Windows81SDK",
    "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81",
    "Microsoft.VisualStudio.Component.VC.ATLMFC",
    "Microsoft.VisualStudio.Component.Windows10SDK.17134",
    "Microsoft.VisualStudio.Workload.NativeDesktop",
    "Microsoft.VisualStudio.Component.FSharp.WebTemplates",
    "Microsoft.NetCore.ComponentGroup.Web.2.1",
    "Microsoft.VisualStudio.Component.Windows10SDK",
    "Microsoft.VisualStudio.Component.TestTools.Core",
    "Microsoft.VisualStudio.Workload.NetCoreTools"
  ]
}

Running vcpkg install from inside the actual x64 Native Tools Command Prompt for VS 2017, it still complains it can’t find it lol:

C:Userskwureposvcpkg>vcpkg install aws-sdk-cpp[s3,sqs]:x64-windows-static-vc141
Computing installation plan...
The following packages will be built and installed:
  * aws-c-auth[core]:x64-windows-static-vc141 -> 0.6.3#2
  * aws-c-cal[core]:x64-windows-static-vc141 -> 0.5.12#2
  * aws-c-common[core]:x64-windows-static-vc141 -> 0.6.9#2
  * aws-c-compression[core]:x64-windows-static-vc141 -> 0.2.14#2
  * aws-c-event-stream[core]:x64-windows-static-vc141 -> 0.2.7#2
  * aws-c-http[core]:x64-windows-static-vc141 -> 0.6.5#2
  * aws-c-io[core]:x64-windows-static-vc141 -> 0.10.7#2
  * aws-c-mqtt[core]:x64-windows-static-vc141 -> 0.7.6#3
  * aws-c-s3[core]:x64-windows-static-vc141 -> 0.1.25#2
  * aws-checksums[core]:x64-windows-static-vc141 -> 0.1.11#3
  * aws-crt-cpp[core]:x64-windows-static-vc141 -> 0.15.1#3
    aws-sdk-cpp[core,dynamodb,kinesis,s3,sqs]:x64-windows-static-vc141 -> 1.9.160#1
  * openssl[core]:x64-windows-static-vc141 -> 1.1.1n
  * vcpkg-cmake[core]:x64-windows -> 2022-01-19
  * vcpkg-cmake-config[core]:x64-windows -> 2022-02-06
  * zlib[core]:x64-windows-static-vc141 -> 1.2.11#13
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Error: in triplet x64-windows-static-vc141: Unable to find a valid Visual Studio instance
    with toolset version vc141
The following Visual Studio instances were considered:
    C:Program Files (x86)Microsoft Visual Studio2019Professional
    C:Program Files (x86)Microsoft Visual Studio2019Professional
    C:Program Files (x86)Microsoft Visual Studio2017Professional
The following paths were examined for Visual Studio instances:
    C:Program Files (x86)Microsoft Visual Studio2019ProfessionalVCAuxiliary/Buildvcvarsall.bat
    C:Program Files (x86)Microsoft Visual Studio2019ProfessionalVCTools/MSVC14.29.30037bin/HostX86/x86dumpbin.exe
    C:Program Files (x86)Microsoft Visual Studio2019ProfessionalVCTools/MSVC14.16.27023bin/HostX86/x86dumpbin.exe
    C:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCAuxiliary/Buildvcvarsall.bat
    C:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCTools/MSVC14.16.27023bin/HostX86/x86dumpbin.exe

C:Userskwureposvcpkg>dir "c:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCAuxiliaryBuildvcvarsall.bat"
 Volume in drive C has no label.
 Volume Serial Number is 7655-EC2B

 Directory of c:Program Files (x86)Microsoft Visual Studio2017ProfessionalVCAuxiliaryBuild

07/01/2021  07:40 PM             9,889 vcvarsall.bat
               1 File(s)          9,889 bytes
               0 Dir(s)  74,271,522,816 bytes free

C:Userskwureposvcpkg>

FWIW, here’s the triplet I’m using:

C:Userskwureposvcpkg>type tripletsx64-windows-static-vc141.cmake
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_PLATFORM_TOOLSET vc141)
C:Userskwureposvcpkg>

And vcpkg version:

C:Userskwureposvcpkg>git rev-parse HEAD
6f827f25f74033593aee7044f9532bf3abdf7b6b

I am watching this video about machine learning with a Yolo algorithm and in this video it says to install vcpkg (by the way, this is the github repo with those instructions)

and this is the error I got while using the .vcpkg install darknet[opencv-base,cuda,cudnn]:x64-windows command:

Error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance
The following paths were examined for Visual Studio instances:
    D:Visual StudioVCAuxiliary/Buildvcvarsall.bat

Environment

  • OS: Windows
  • Installed Dependency: Visual Studio 2017 (with the english language pack)

To Reproduce
Steps to reproduce the behavior:

  1. Have the above environment
  2. Execute this sequence of code in your console (I used windows Powershell for this case):
>mkdir vcpkg
>cd .vcpkg
>git clone https://github.com/microsoft/vcpkg
>cd vcpkg
>$env:VCPKG_ROOT=$PWD
>.bootstrap-vcpkg.bat
>.vcpkg install darknet[opencv-base,cuda,cudnn]:x64-windows

Expected behavior
I expected the process to finish but it gave me this error instead (with full process included):

.vcpkg install darknet[opencv-base,cuda,cudnn]:x64-windows
Computing installation plan...
A suitable version of cmake was not found (required v3.21.1). Downloading portable cmake v3.21.1...
Extracting cmake...
A suitable version of 7zip was not found (required v19.0.0). Downloading portable 7zip v19.0.0...
Downloading 7zip...
  https://www.7-zip.org/a/7z1900-x64.msi -> D:vcpkgvcpkgdownloads7z1900-x64.msi
Extracting 7zip...
The following packages will be built and installed:
  * bzip2[core]:x64-windows -> 1.0.8#2
  * cuda[core]:x64-windows -> 10.1#8
  * cudnn[core]:x64-windows -> 7.6.5#4
    darknet[core,cuda,cudnn,opencv-base]:x64-windows -> 2021-04-16#1
  * ffmpeg[avcodec,avdevice,avfilter,avformat,core,swresample,swscale]:x64-windows -> 4.4.1#5
  * giflib[core]:x64-windows -> 5.2.1#1
  * hdf5[core,szip,zlib]:x64-windows -> 1.12.1#3
  * leptonica[core]:x64-windows -> 1.81.1
  * libarchive[bzip2,core,libxml2,lz4,lzma,openssl,zstd]:x64-windows -> 3.5.2#2
  * libiconv[core]:x64-windows -> 1.16#11
  * libjpeg-turbo[core]:x64-windows -> 2.1.2
  * liblzma[core]:x64-windows -> 5.2.5#4
  * libpng[core]:x64-windows -> 1.6.37#16
  * libwebp[core,nearlossless,simd,unicode]:x64-windows -> 1.2.1
  * libxml2[core]:x64-windows -> 2.9.12#4
  * lz4[core]:x64-windows -> 1.9.3#3
  * opencv[contrib,core,default-features,dnn,ffmpeg]:x64-windows -> 4.5.4#1
  * opencv4[contrib,core,default-features,dnn,ffmpeg,jpeg,png,quirc,tiff,webp]:x64-windows -> 4.5.4#2
  * openjpeg[core]:x64-windows -> 2.4.0
  * openssl[core]:x64-windows -> 1.1.1m
  * protobuf[core]:x64-windows -> 3.18.0#1
  * pthreads[core]:x64-windows -> 3.0.0#10
  * quirc[core]:x64-windows -> 1.1#2
  * stb[core]:x64-windows -> 2020-09-14#1
  * szip[core]:x64-windows -> 2.1.1#7
  * tesseract[core]:x64-windows -> 4.1.1#9
  * tiff[core,jpeg,lzma,zip]:x64-windows -> 4.3.0#4
  * vcpkg-cmake[core]:x64-windows -> 2021-12-20
  * vcpkg-cmake-config[core]:x64-windows -> 2021-12-28
  * vcpkg-pkgconfig-get-modules[core]:x64-windows -> 2021-04-02#1
  * zlib[core]:x64-windows -> 1.2.11#13
  * zstd[core]:x64-windows -> 1.5.0#1
Additional packages (*) will be modified to complete this operation.
Error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance
The following paths were examined for Visual Studio instances:
    D:Visual StudioVCAuxiliary/Buildvcvarsall.bat

I am trying to start coding so I started watching the Cs50 course.
Now i am trying to use VsCode as my program editor because I know it’s pretty good and it is the same editor they use in the Cs50 lecture, but when i try to include libraries like stdio or cs50 it spits out «#include-Fehler erkannt. Aktualisieren Sie Ihren includePath. Wellenlinien sind für diese Übersetzungseinheit». I’ve tried a couple of things and now installed Vcpkg. While trying to install cs50 by typing «.vcpkg install cs50» into my PowerShell Window i got the error message «error: while looking for cs50:x86-windows:
error: while loading cs50:
The port directory (C:UsersfelixDEVvcpkgportscs50) does not exist» so i tried to install something else first to make sure it works.
I copied what the guy in my Youtube Video typed in to install sqlite3 but now i get the error message «error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance
The following paths were examined for Visual Studio instances:
C:Program FilesMicrosoft Visual Studio2022CommunityVCAuxiliary/Buildvcvarsall.bat».
I added english as a supported language in Visual Stuio Installer but it didn’t help and all the other solution people talked about were not comprehendable for me.

I hope someone can help me and if you can please try to explain it in simple terms as i am failry new to this whole thing.
Sorry for my bad english and thank you all in advance

asked 2 days ago

Lxqnd's user avatar

4

Issue

I am trying to fix the error I’m facing while running a rust program on my VScode as shown in the link below, install openssl and and set the paths using vcpkg by following the post:
Error: could not find native static library `ssl`, perhaps an -L flag is missing? on WIndows

According to the answer, I ran the following instructions through visual studio code terminal:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.bootstrap-vcpkg.bat

The above codes executed successfully but the code below to install openssl resulted in an error.

.vcpkg.exe install openssl:x64-windows-static

error:

Error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance

How do I resolve the above error? I have cmake installed and functioning properly but still no luck trying to get vcpkg to install openssl.The paths mentioned in the link answer is also set and I am running all the codes above in the correct directory I made.

Directory where I ran the codes:

C:UsersAdministratorDesktopwintun-maindtlsvcpkgfilevcpkg>

Solution

Install the latest version of the Visual studio installer even if you have visual studio code installed.
Check the boxes to install desktop development tools for Linux and windows
Check the box to install C++ CMake tools as well
Then proceed with the installation.

Answered By – Aishwarya Menon

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

  • There is NO official Otland’s Discord server and NO official Otland’s server list. The Otland’s Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland’s Staff. Do not get scammed!

  • Thread starter
    overdriven

  • Start date
    Feb 21, 2022

  • #1

I want to compile TFS on Windows (at commit 17bf6). I have installed vcpkg and Visual Studio community edition 2022.

I’m following github.com/otland/forgottenserver/wiki/Compiling-on-Windows to install required libraries.

At the end I get an error:

Error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance
The following paths were examined for Visual Studio instances:
C:Program FilesMicrosoft Visual Studio2022CommunityVCAuxiliary/Buildvcvarsall.bat

BUT I have installed VS in C:Program FilesMicrosoft Visual Studio2022 — I don’t understand why it fails to find it? Am I missing some VS components? Which ones?

Edit. Looks like I’m missing VC, but what is VC?
My folder C:Program FilesMicrosoft Visual Studio2022Community doesn’t have any VC folder as in examined path:
VCAuxiliary/Buildvcvarsall.bat

Post automatically merged: Feb 21, 2022

Fixed.

One has to install C++ CMake tools for Windows component.
1645448352721.png

@Evil Puncker Perhaps the wiki can be updated with this detail? I know it should be obvious but it’s not for everyone…
I don’t know how to contribute a change to wiki on github… or I don’t have rights.

Post automatically merged: Feb 21, 2022

Furthermore, one will also need components: Windows Universal CRT SDK and Windows 10 SDK

Last edited: Feb 21, 2022

Evil Puncker


  • #2

@Evil Puncker Perhaps the wiki can be updated with this detail? I know it should be obvious but it’s not for everyone…
I don’t know how to contribute a change to wiki on github… or I don’t have rights.

visual studio should be installed with default settings and English lang pack, it seems like you had unselected all stuff that was selected by default or did they change the installer to not have stuff by default anymore?

  • #3

@overdriven

It has the installing instruction recorded too, hope it helps!

  • #4

seems like you had unselected all stuff that was selected by default

@Evil Puncker I don’t remember, I rather did not, but if you look at the video that ralke posted you’ll see that Desktop Development with C++ is not checked by default in VS 2022.

nugo

nugo

Australia OT Mapper


  • #5

@Evil Puncker
I came back after a few years to compile master branch for experiments. Got the same problem as this guy following

I suggest updating the above documentation to make sure when installing community 2022 that you include the following components:

  • Windows Universal CRT SDK
  • Windows 10 SDK
  • C++ CMake tools for Windows
  • English language pack

Ssspade

vcpkg install error:in triplet x64-windows: Unable to find a valid Visual Studio instance Could not locate a complete Visual Studio instance

Describe the bug
A clear and concise description of what the bug is.
When using vcpkg install, an error occurred: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance

Environment

  • OS: Windows10,x86_64
  • Compiler: Visual Studio Code

To Reproduce
Steps to reproduce the behavior:

  1. .vcpkg install thrift
  2. See error
    Error: in triplet x86-windows: Unable to find a valid Visual Studio instance
    Could not locate a complete Visual Studio instance

rrodrigueznt

Hi! I’m facing the same issue in a similar environment, trying to install any package. Some comments:

  1. Visual Studio Code is not a compiler. It is an editor that accepts a lot of extensions, enabling among many other features compiling and debugging.
  2. I don’t know if Visual Studio Code could be considered «a complete Visual Studio instance» as the error message reads.
  3. Messages available from Visual Studio Code error link to https://vcpkg.io/en/index.html and propose the use of vcpkg to install libraries for lacking headers.
  4. Thus, I guess we are missing some step in the installation process.

Please, should modify the triplet x86-windows.cmake? How? Should we create a new one? I don’t even know for that triplet if we are working in a 64bits environment.

Please, should we install and configure CMake?

Sorry, I’m a bit lost. Thanks for your help!

duzp

Visua lStudio Installer->installed version->modify-> Language package->add English package, can resolve this problem

JackBoosY

IJkb

I am having a similar problem. «Could not locate a complete Visual Studio instance» although it is installed. I tried to use vcpkg to install catch2. English langauge package is already installed… Any other suggestions how to resolve this? I hope it is fine I write here, I think it is the same issue…

JackBoosY

KevinShu-AEUST

I have the same problem, I use VS CODE to compile, but now there is a problem with installing the egin3 pakage.

JackBoosY

KevinShu-AEUST

sfhacker

You can use this simple tool to find out the VS instances on your box, including your SDKs:

image

KevinShu-AEUST

你可以使用這個簡單的工具來了解你的機器上的 VS 實例,你的 SDK

圖片

I should to download pkg —mgr.exe 嗎?

sfhacker

KevinShu-AEUST

@KevinShu-AEUST Sorry, I don’t quite understand your question!
Sorry, I don’t know the relevant cmd commands very well, and I’m still researching.

sfhacker

JackBoosY

Please use Visual Studio Installer to install the following Visual Studio components:

  1. C++:
  • Windows Universal C Runtime: Microsoft.VisualStudio.Component.Windows10SDK
  • C++ core desktop features: Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core
  • Visual Studio Build tools:
    • Microsoft.VisualStudio.Component.VC.140 (for Visual Studio 2015)
    • Microsoft.VisualStudio.Component.VC.Tools.x86.x64 (for Visual Studio 2017 or later)
  • MSBuild: Microsoft.Component.MSBuild
  • Windows SDK (one of them):
    • 8.1: Microsoft.VisualStudio.Component.Windows81SDK
    • 10.0.18362: Microsoft.VisualStudio.Component.Windows10SDK.18362
    • 10.0.19041: Microsoft.VisualStudio.Component.Windows10SDK.19041
    • 10.0.20348: Microsoft.VisualStudio.Component.Windows10SDK.20348
    • 11.0.22000: Microsoft.VisualStudio.Component.Windows11SDK.22000
  1. ARM/ARM64:
  • Visual Studio Build tools for ARM: Microsoft.VisualStudio.Component.VC.Tools.arm
  • Visual Studio Build tools for ARM: Microsoft.VisualStudio.Component.VC.Tools.arm64
  1. UWP:
  • Visual Studio Build tools for UWP: Microsoft.VisualStudio.ComponentGroup.UWP.VC

S0PEX

Is there any solution to purely run vcpkg with the EWDK?
Am not able to install VS on this machine and rely on CLion which works fine with EWDK and EWDK is sufficient to build all my projects so I would like to keep a static install out of this system.

Setting the ENV before running vcpkg doesn’t work, but as far as I can tell the EWDK should have everything required to build the packages.

Error: in triplet x64-windows-static: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance
The following paths were examined for Visual Studio instances:
    E:Program FilesMicrosoft Visual Studio2019BuildToolsVCAuxiliary/Buildvcvarsall.bat

pawelkondratiev2014

Установка английского языка помогла

JackBoosY

@S0PEX No, currently vcpkg needs Visual Studio core desktop features.

the-overdriven

Error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance
The following paths were examined for Visual Studio instances:
    C:Program FilesMicrosoft Visual Studio2022CommunityVCAuxiliary/Buildvcvarsall.bat

Visual Studio is installed in C:Program FilesMicrosoft Visual Studio2022 — I don’t understand what is the problem?

sfhacker

image

JackBoosY

Error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance
The following paths were examined for Visual Studio instances:
    C:Program FilesMicrosoft Visual Studio2022CommunityVCAuxiliary/Buildvcvarsall.bat

Visual Studio is installed in C:Program FilesMicrosoft Visual Studio2022 — I don’t understand what is the problem?

Can you please view my comment and have a try?

Thanks.

Recommend Projects

  • React photo

    React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo

    Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo

    Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo

    TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo

    Django

    The Web framework for perfectionists with deadlines.

  • Laravel photo

    Laravel

    A PHP framework for web artisans

  • D3 photo

    D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Visualization

    Some thing interesting about visualization, use data art

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo

    Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo

    Microsoft

    Open source projects and samples from Microsoft.

  • Google photo

    Google

    Google ❤️ Open Source for everyone.

  • Alibaba photo

    Alibaba

    Alibaba Open Source for everyone

  • D3 photo

    D3

    Data-Driven Documents codes.

  • Tencent photo

    Tencent

    China tencent open source team.

Host Environment

  • OS: Windows 10
  • Compiler: mingw-w64 gcc 11.2

To Reproduce
./vcpkg install sdl2 --triplet=x64-mingw-dynamic (or static)

Failure logs

`The following packages will be built and installed:
sqlite3[core]:x64-mingw-static -> 3.37.0#1

  • vcpkg-cmake[core]:x64-windows -> 2021-12-20
  • vcpkg-cmake-config[core]:x64-windows -> 2021-12-28
    Additional packages (*) will be modified to complete this operation.
    Error: in triplet x64-windows: Unable to find a valid Visual Studio instance
    The following VS instances were excluded because the English language pack is unavailable:
    C:Program FilesMicrosoft Visual Studio2022Community
    Could not locate a complete Visual Studio instance
    The following paths were examined for Visual Studio instances:
    C:Program FilesMicrosoft Visual Studio2022CommunityVCAuxiliary/Buildvcvarsall.bat
    C:Program FilesMicrosoft Visual Studio2022CommunityVCTools/MSVC14.30.30705bin/HostX86/x86dumpbin.exe`

You must also set the host triplet to mingw.

Solved. thanks. the problem was that i missed to set the environment variables

export VCPKG_DEFAULT_TRIPLET=x64-mingw-dynamic
export VCPKG_DEFAULT_HOST_TRIPLET=x64-mingw-dynamic

Я пытаюсь исправить ошибку, с которой я столкнулся при запуске программы ржавчины на моем VScode, как показано в ссылке ниже, установить openssl и установить пути с помощью vcpkg, следуя сообщению: Ошибка: не удалось найти родную статическую библиотеку `ssl`, возможно, отсутствует флаг -L? в Windows

Согласно ответу, я выполнил следующие инструкции через терминал визуального кода студии:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.bootstrap-vcpkg.bat

Вышеупомянутые коды выполнились успешно, но приведенный ниже код для установки openssl привел к ошибке.

.vcpkg.exe install openssl:x64-windows-static

Ошибка:

Error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance

Как устранить указанную выше ошибку? У меня установлен cmake и он работает правильно, но все еще не удается заставить vcpkg установить openssl. Пути, упомянутые в ответе по ссылке, также установлены, и я запускаю все приведенные выше коды в правильном каталоге, который я создал.

Каталог, где я запускал коды:

C:UsersAdministratorDesktopwintun-maindtlsvcpkgfilevcpkg>

1 ответ

Лучший ответ

Установите последнюю версию установщика Visual Studio, даже если у вас установлен код Visual Studio. Установите флажки, чтобы установить средства разработки рабочего стола для Linux и Windows. Установите флажок, чтобы также установить инструменты C++ CMake. Затем продолжите установку.


2

Aishwarya Menon
9 Май 2022 в 19:30

Понравилась статья? Поделить с друзьями:
  • Error in tightvnc viewer подключение не установлено т к конечный компьютер отверг запрос
  • Error in tightvnc viewer no security types supported server sent security types
  • Error in tightvnc viewer no security types supported raspberry
  • Error in tightvnc viewer connection parameters host port socket gates is empty
  • Error in the system 1983