2

I just downloaded and configured vcpkg. But when I tried to install a package, I got this error message:

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

Does it mean it is necessary to install Visual Studio to make the vcpkg available?

Considering that all my work is doing on clion and vscode, if it's necessary, what's the minimum required components should I install?

Or maybe it's just my wrong somewhere?

zclll
  • 77
  • 7

1 Answers1

1

No, you do not need to install Visual Studio to use vcpkg. By default, vcpkg tries to build packages with the MSVC compiler if you are on Windows. You could install just the Visual Studio Build Tools, which would give you MSVC without installing the entire IDE, if you wish.

What compiler are you currently using?

If you happen to be using MinGW, you should tell vcpkg to use that. See: https://vcpkg.io/en/docs/users/mingw.html.

Disclaimer: I work on the vcpkg tool.

Augustin Popa
  • 1,423
  • 1
  • 19
  • 22
  • 1
    Is there an option to use any other compiler besides msvc (clang/gcc) on Windows? Same question for Linux. Can't find info about that – jdfa Sep 24 '22 at 22:06