How to set v142 installed by VS2022 #38616
-
According to the instructions,I can set the specific version of the compiler in triplet:
I have installed vc142 by VS2022 build tool,I can find some related folders in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519 However when I install packages by vcpkg , it will report
Am I missing any steps? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Try changing VCPKG_PLATFORM_TOOLSET_VERSION to "14.29.30133" and see if that works. |
Beta Was this translation helpful? Give feedback.
-
@StarGate-One It can find now , but why? |
Beta Was this translation helpful? Give feedback.
-
Because the v142 toolset was selected then it was told to use version "14.39.33519" C/C++ version from the v142 toolset, which does not exist. Bottom line you do not need both as you can see a simple mistake can cause vcpkg erratic behavior. |
Beta Was this translation helpful? Give feedback.
Because the v142 toolset was selected then it was told to use version "14.39.33519" C/C++ version from the v142 toolset, which does not exist.
The first 3 numbers on the version are the toolset.
You just as easily could have just put in your triplet file
set(VCPKG_PLATFORM_TOOLSET v142)
in which vcpkg would use the latest v142 C/C++ version you have loaded, orset(VCPKG_PLATFORM_TOOLSET_VERSION "14.29.30133)
and vcpkg would use that version if available otherwise it would error out.Bottom line you do not need both as you can see a simple mistake can cause vcpkg erratic behavior.