setting visual studio variables, such as VC_LibraryPath_x64 (AGAIN)

Ed Broughton 31 Reputation points
2021-07-10T20:52:37.04+00:00

I asked this question previously.

I received two replies, both of which suggested that the poster had not carefully read my question (and one of which provided incorrect and irrelevant feedback).

So, I am reposting.

To be clear.

A) I have never changed the values of any of the below variables.
B) Following installation of Visual Studio 2019, I have never been able to build a project on the specified computer, because the link process cannot find the libraries that "come with" Visual Studio (e.g., LIBCMTD.lib)

The following variables are used by my projects.
However, I see no means to either see or set their values.

How do I see and set their values (some of which are clearly incorrect)?

Variables used by Visual Studio

VC_IncludePath
WindowsSDK_IncludePath
VC_LibraryPath_x64
WindowsSDK_LibraryPath_x64
VC_LibraryPath_x86
WindowsSDK_LibraryPath_x86

Thanks in advance

P.S. It seems absurd if there is no easy means of examining and setting their values.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,869 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,628 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,009 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sam of Simple Samples 5,526 Reputation points
    2021-07-11T00:23:46.057+00:00

    I am using VS 2017, the following might be different for VS 2019.

    Find the Visual Studio Installer; execute it. Click the Modify button. Is the checkbox checked for Desktop development with C++? In the right side (Installation Details) is a checkbox for a Windows SDK checked (there are multiple versions but you do not need all of them)? There are many versions of C++ to choose from, such as VC++ 2017 and Visual C++ for MFC. Which ones have you selected? If the necessary components have not been installed then they cannot be found because they do not exist and messing with the variables is a foolish mistake.

    113564-t.jpg


  2. Bruce (SqlWork.com) 61,181 Reputation points
    2024-06-06T16:00:26.0033333+00:00

    in vs install folder there are a bunch of scripts that set the env variables. winsdk.bat for example. for vs2022 pro they are in "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\Tools".

    you probably need to uninstall and reinstall the workloads to get the correct scripts.

    0 comments No comments