SetEnv.cmd
สคริปต์ที่คำสั่ง "SDK ให้" วิ่งทางลัดสำหรับการตรวจสอบcl.exe
ในสถานที่ต่าง ๆ PATH
ก่อนที่การตั้งค่ารายการที่จะเพิ่ม ดังนั้นจึงไม่สามารถเพิ่มอะไรได้หากไม่ได้ติดตั้งคอมไพเลอร์ C แบบดั้งเดิม
<SDK install dir>\Bin\SetEnv.cmd
ในการแก้ไขปัญหาที่ใช้แพทช์ต่อไปนี้ วิธีนี้จะแก้ไขเส้นทางที่หายไปไปยังเครื่องมืออื่น ๆ ที่อยู่ใน<SDK install dir>\Bin
และโฟลเดอร์ย่อย แน่นอนคุณสามารถติดตั้ง C คอมไพเลอร์แทนเพื่อแก้ไขข้อผิดพลาดนี้
--- SetEnv.Cmd_ 2010-04-27 19:52:00.000000000 +0400
+++ SetEnv.Cmd 2013-12-02 15:05:30.834400000 +0400
@@ -228,10 +228,10 @@
IF "%CURRENT_CPU%" =="x64" (
IF "%TARGET_CPU%" == "x64" (
+ SET "FxTools=%FrameworkDir64%\%FrameworkVersion%;%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework64\v3.5;%windir%\Microsoft.NET\Framework\v3.5;"
+ SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools\x64;%WindowsSdkDir%Bin\x64;%WindowsSdkDir%Bin;"
IF EXIST "%VCTools%\amd64\cl.exe" (
SET "VCTools=%VCTools%\amd64;%VCTools%\VCPackages;"
- SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools\x64;%WindowsSdkDir%Bin\x64;%WindowsSdkDir%Bin;"
- SET "FxTools=%FrameworkDir64%\%FrameworkVersion%;%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework64\v3.5;%windir%\Microsoft.NET\Framework\v3.5;"
) ELSE (
SET VCTools=
ECHO The x64 compilers are not currently installed.
@@ -239,10 +239,10 @@
ECHO .
)
) ELSE IF "%TARGET_CPU%" == "IA64" (
+ SET "FxTools=%FrameworkDir64%\%FrameworkVersion%;%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework64\v3.5;%windir%\Microsoft.NET\Framework\v3.5;"
+ SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools\x64;%WindowsSdkDir%Bin\x64;%WindowsSdkDir%Bin;"
IF EXIST "%VCTools%\x86_ia64\cl.exe" (
SET "VCTools=%VCTools%\x86_ia64;%VCTools%\VCPackages;"
- SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools\x64;%WindowsSdkDir%Bin\x64;%WindowsSdkDir%Bin;"
- SET "FxTools=%FrameworkDir64%\%FrameworkVersion%;%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework64\v3.5;%windir%\Microsoft.NET\Framework\v3.5;"
) ELSE (
SET VCTools=
ECHO The IA64 compilers are not currently installed.
@@ -250,10 +250,10 @@
ECHO .
)
) ELSE IF "%TARGET_CPU%" == "x86" (
+ SET "FxTools=%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework\v3.5;"
+ SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools;%WindowsSdkDir%Bin;"
IF EXIST "%VCTools%\cl.exe" (
SET "VCTools=%VCTools%;%VCTools%\VCPackages;"
- SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools;%WindowsSdkDir%Bin;"
- SET "FxTools=%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework\v3.5;"
) ELSE (
SET VCTools=
ECHO The x86 compilers are not currently installed.
@@ -263,10 +263,10 @@
)
) ELSE IF "%CURRENT_CPU%" =="IA64" (
IF "%TARGET_CPU%" == "IA64" (
+ SET "FxTools=%FrameworkDir64%\%FrameworkVersion%;%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework64\v3.5;%windir%\Microsoft.NET\Framework\v3.5;"
+ SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools\IA64;%WindowsSdkDir%Bin\IA64;%WindowsSdkDir%Bin;"
IF EXIST "%VCTools%\IA64\cl.exe" (
SET "VCTools=%VCTools%\IA64;%VCTools%;%VCTools%\VCPackages;"
- SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools\IA64;%WindowsSdkDir%Bin\IA64;%WindowsSdkDir%Bin;"
- SET "FxTools=%FrameworkDir64%\%FrameworkVersion%;%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework64\v3.5;%windir%\Microsoft.NET\Framework\v3.5;"
) ELSE (
SET VCTools=
ECHO The IA64 compilers are not currently installed.
@@ -274,10 +274,10 @@
ECHO .
)
) ELSE IF "%TARGET_CPU%" == "x64" (
+ SET "FxTools=%FrameworkDir64%\%FrameworkVersion%;%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework64\v3.5;%windir%\Microsoft.NET\Framework\v3.5;"
+ SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools\IA64;%WindowsSdkDir%Bin\IA64;%WindowsSdkDir%Bin;"
IF EXIST "%VCTools%\x86_amd64\cl.exe" (
SET "VCTools=%VCTools%\x86_amd64;%VCTools%\VCPackages;"
- SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools\IA64;%WindowsSdkDir%Bin\IA64;%WindowsSdkDir%Bin;"
- SET "FxTools=%FrameworkDir64%\%FrameworkVersion%;%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework64\v3.5;%windir%\Microsoft.NET\Framework\v3.5;"
) ELSE (
SET VCTools=
ECHO The VC compilers are not currently installed.
@@ -285,10 +285,10 @@
ECHO .
)
) ELSE IF "%TARGET_CPU%" == "x86" (
+ SET "FxTools=%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework\v3.5;"
+ SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools;%WindowsSdkDir%Bin;"
IF EXIST "%VCTools%\cl.exe" (
SET "VCTools=%VCTools%;%VCTools%\VCPackages;"
- SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools;%WindowsSdkDir%Bin;"
- SET "FxTools=%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework\v3.5;"
) ELSE (
SET VCTools=
ECHO The x86 compilers are not currently installed.
@@ -298,10 +298,10 @@
)
) ELSE IF "%CURRENT_CPU%"=="x86" (
IF "%TARGET_CPU%" == "x64" (
+ SET "FxTools=%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework\v3.5;"
+ SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools;%WindowsSdkDir%Bin;"
IF EXIST "%VCTools%\x86_amd64\cl.exe" (
SET "VCTools=%VCTools%\x86_amd64;%VCTools%\VCPackages;"
- SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools;%WindowsSdkDir%Bin;"
- SET "FxTools=%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework\v3.5;"
) ELSE (
SET VCTools=
ECHO The x64 cross compilers are not currently installed.
@@ -309,10 +309,10 @@
ECHO .
)
) ELSE IF "%TARGET_CPU%" == "IA64" (
+ SET "FxTools=%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework\v3.5;"
+ SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools;%WindowsSdkDir%Bin;"
IF EXIST "%VCTools%\x86_IA64\cl.exe" (
SET "VCTools=%VCTools%\x86_IA64;%VCTools%;%VCTools%\VCPackages;"
- SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools;%WindowsSdkDir%Bin;"
- SET "FxTools=%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework\v3.5;"
) ELSE (
SET VCTools=
ECHO The IA64 compilers are not currently installed.
@@ -320,10 +320,10 @@
ECHO .
)
) ELSE IF "%TARGET_CPU%" == "x86" (
+ SET "FxTools=%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework\v3.5;"
+ SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools;%WindowsSdkDir%Bin;"
IF EXIST "%VCTools%\cl.exe" (
SET "VCTools=%VCTools%;%VCTools%\VCPackages;"
- SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools;%WindowsSdkDir%Bin;"
- SET "FxTools=%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework\v3.5;"
) ELSE (
SET VCTools=
ECHO The x86 compilers are not currently installed. x86-x86
@@ -331,15 +331,17 @@
ECHO .
)
)
-) ELSE IF EXIST "%VCTools%\cl.exe" (
- SET "VCTools=%VCTools%;%VCTools%\VCPackages;"
- SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools;%WindowsSdkDir%Bin;"
- SET "FxTools=%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework\v3.5;"
) ELSE (
- SET VCTools=
- ECHO The x86 compilers are not currently installed. default
- ECHO Please go to Add/Remove Programs to update your installation.
- ECHO .
+ SET "FxTools=%FrameworkDir32%%FrameworkVersion%;%windir%\Microsoft.NET\Framework\v3.5;"
+ SET "SdkTools=%WindowsSdkDir%Bin\NETFX 4.0 Tools;%WindowsSdkDir%Bin;"
+ IF EXIST "%VCTools%\cl.exe" (
+ SET "VCTools=%VCTools%;%VCTools%\VCPackages;"
+ ) ELSE (
+ SET VCTools=
+ ECHO The x86 compilers are not currently installed. default
+ ECHO Please go to Add/Remove Programs to update your installation.
+ ECHO .
+ )
)
:: --------------------------------------------------------------------------------------------