Many users ask about "Could not locate a complete toolset", but the only solution proposed is to install the English language pack for Visual Studio. Well, I have VS 2015 Update 3 installed, English language pack is installed (I use only English). Visual Studio is installed on my computer in C:\VS2015 directory. I was able to bootstrap and build vcpkg fine. But trying to use it, no such luck, only a cryptic message:
C:\github\vcpkg>vcpkg.exe install tesseract:x64-windows-static
Computing installation plan...
The following packages will be built and installed:
Nothing beyond that, it did not "examine" any paths... What to do?
@gregko
C:\VS2015 I would theorize vcpkg is having problems locating everything it needs to work properly.<vcpkg-root>\toolsrc\src\vcpkg\visualstudio.cpp, vcpkg looks for many of VS2015 aka Microsoft Visual Studio 14 toolset v140 binaries within path program_files_32_bit variable, aka C:\Program Files\ on 32-bit x86 systems, or C:\Program Files (x86)\ on 64-bit x64 systems.Windows SDK v8.1 or later.Thank you, appreciate your help! Strange that they don't have some easy environment variable to set this, but hard code instead... I just modified visualstudio.cpp, line 161 line this, and now it works for me:
// VS2015 instance from Program Files
//append_if_has_cl_vs140(program_files_32_bit / "Microsoft Visual Studio 14.0"); - commented out
append_if_has_cl_vs140("C:/VS2015"); // added my own dir
@gregko Do you have a vswhere.exe in C:\Program Files (x86)\Microsoft Visual Studio\Installer, and does vswhere -legacy list instanceId: VisualStudio.14.0 at installationPath: C:\VS2015\ with installationVersion: 14.0?
Regardless, what works for me to get vcpkg to locate VS 2015 in a non-default directory is add a new triplet for example x64-windows-static-v140.cmake with set(VCPKG_VISUAL_STUDIO_PATH "C:\\VS2015\\") and set(VCPKG_PLATFORM_TOOLSET v140) appended at the end.
Thank you! This is what I tried before even posting here, the only difference is aht I did not include trailing \ - I had set(VCPKG_VISUAL_STUDIO_PATH "C:\VS2015").
@gregko, you can see https://github.com/microsoft/vcpkg/blob/5e40afca0d7286a9a7d742822cc2a1179a9e63fc/docs/users/triplets.md#vcpkg_visual_studio_path for usage.
Thank you all for helping resolve this issue!
Thank you! This is what I tried before even posting here, the only difference is aht I did not include trailing \ - I had set(VCPKG_VISUAL_STUDIO_PATH "C:\VS2015").
Hi, can you share how to add set(VCPKG_VISUAL_STUDIO_PATH "C:\VS2015"). I install the vs2015 in D:\application\visualstudio and change to english package, but I still got thesame problem as you. So can you share the details about in which file to set the VCPKG_VISUAL_STUDIO_PATH