Вопрос

Sorry about being a newbie for this issue... But I'd really like to know the scope and when to run the SetEnv.Cmd under the Bin folder of the Windows SDK.

Since I only ran it in a command prompt, isn't the environment variable settings I did their only local to that session? Do I need to re-run it after I close that session? I tried and it seems to be that I don't need to, but... Why is this all done in a local session?

Sorry about the naive question,

Shawn

Это было полезно?

Решение

The SDK build tools require environment variables to be configured for the include path, library path, exe path, etc. Each version of the SDK has its own include files, etc. so each version requires different values for the variables. Hence the variables cannot be configured as permanent variables for the user (or system).

Instead, each SDK version provides the SetEnv.cmd batch file to configure the environment for that version of the SDK, and the variables are local to the current command-prompt.

When you install the SDK you get a shortcut created in the Start Menu that opens a command-prompt and runs SetEnv.cmd for you. For example, on my computer I have "Windows SDK 7.1 Command Prompt".

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top