Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

WindowsSdkDir not found

Manish_K_1
Beginner
4,348 Views

I was using Intel Visual Fortran Compiler 11.1 with Visual Studio 2008 pro and Abaqus 6.10 to write and use subroutines in Abaqus. I had linked it properly and it was working fine before. However, today when I tried to use it after 1 month, the Intel Visual Fortran compiler command window comes with an additional message that "WindowsSdkDir not found", and my subroutines are not working anymore.

I don't know if the problem is because of this error message or something else. I searched the internet and also this forum and also reinstalled Visual Studio 2008 again, but no luck. I have attached the screenshot of command window.

The message the I get from Abaqus log file shows me that subroutine is being compiled, but there is issue with linking (at least that what I understood from message):

Abaqus JOB Bearing
Abaqus 6.10-EF2
Begin Compiling Abaqus/Standard User Subroutines
3/13/2013 6:03:18 PM
End Compiling Abaqus/Standard User Subroutines
3/13/2013 6:03:26 PM
Begin Linking Abaqus/Standard User Subroutines
3/13/2013 6:03:26 PM
ValueError: IOError: : Unknown error

Could somebody please help me with this?

0 Kudos
23 Replies
SergeyKostrov
Valued Contributor II
3,948 Views
>>...Intel Visual Fortran compiler command window comes with an additional message that "WindowsSdkDir not found"... In Command Prompt enter SET, press Enter and review list of Environment Variables. If WindowsSdkDir is Not listed this is wrong. Also, any chance that a Windows SDK was installed on a network drive which is Not available any longer, or uninstalled? Please try to recall if any modifications, installations or uninstalls were done recently on your computer and take a look at a bat file you've invoked ( they are relatevely simple ).
0 Kudos
TimP
Honored Contributor III
3,948 Views

WindowsSDKDir would normally be installed when you add the VS C++ compiler install option (including, for VS2008, the X64 sub-option).  It would be updated when you apply service packs.

For VS2008 with service packs, I have

WindowsSdkDir=c:\Program Files\Microsoft SDKs\Windows\v6.0A\

0 Kudos
Manish_K_1
Beginner
3,948 Views

After using the SET on the command prompt, I checked the environment variables and I found location of this folder: "C:\Program Files\Microsoft SDKs\Windows\v6.0A\"
This is the folder where my first SDKs are located, I have two folders in C:\Program Files\Microsoft SDKs\Windows\ for SDKs v6.0A and v7.1.
My second SDKs are located in C:\Program Files (x86)\Microsoft SDKs\Windows for SDKs v5.0, v6.0A, v7.0A.

I checked the bat file that is being called through intel compiler, ifortvars_intel64.bat, and it is invoking C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat, in which depending on system architechture (I have Intel i7 64 bit system), it is pointing me to the file vcvarsamd64.txt (attached here). I saw in this file and found the following lines:

:GetWindowsSdkDir
@call :GetWindowsSdkDirHelper HKLM > nul 2>&1
@if errorlevel 1 call :GetWindowsSdkDirHelper HKCU > nul 2>&1
@if errorlevel 1 echo WindowsSdkDir not found
@exit /B 0

:GetWindowsSdkDirHelper
@SET WindowsSdkDir=
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\Microsoft SDKs\Windows" /v "CurrentInstallFolder"') DO (
if "%%i"=="CurrentInstallFolder" (
SET "WindowsSdkDir=%%k"
)
)
@if "%WindowsSdkDir%"=="" exit /B 1
@exit /B 0

As I understood, it asks me to check in the registry, so I went and checked in the registry in HKCM and HKCU "...\SOFTWARE\Microsoft\Microsoft SDKs\Windows\".
In HKCM "CurrentInstallFolder" is set to "C:\Program Files\Microsoft SDKs\Windows\v6.0A\". HKCM has two folders for v6.0A and v7.0A. v7.0A is for product VS2010 Pro which is also installed on my computer (I had to install VS2008 because Abaqus, Intel Compiler 11.1 linking was not compatible with VS2010)
In HKCU "CurrentInstallFolder" is set to same "C:\Program Files\Microsoft SDKs\Windows\v6.0A\". HKCU has only one folder for v6.0A.

Screenshot of both registry files are attached. Note that the compiler and linking between compiler, Abaqus and VS2008 has worked fine before and I was using it with Abaqus subroutines.

I don't think SDKs were installed in network directory, and I can't remember any installation that were made to the computer. I am novice user and don't understand much of programming environment, but trying hard my way to get through this. It'd be really helpful if anyone could point me in the right direction.

Thanks 

0 Kudos
Manish_K_1
Beginner
3,948 Views

TimP (Intel) wrote:

WindowsSDKDir would normally be installed when you add the VS C++ compiler install option (including, for VS2008, the X64 sub-option).  It would be updated when you apply service packs.

For VS2008 with service packs, I have

WindowsSdkDir=c:\Program Files\Microsoft SDKs\Windows\v6.0A\

Hi Tim,
where was this? "WindowsSdkDir=c:\Program Files\Microsoft SDKs\Windows\v6.0A\" in the environment variable?
I have VS2008 Pro that I got from my university MSDN community. I can get VS2008 SP1 as well, should I install that instead?

0 Kudos
SergeyKostrov
Valued Contributor II
3,948 Views
For example this is the list of environment variables after I've executed SET in the Command Prompt: ... USERDOMAIN=SERGEYK USERNAME=Admin USERPROFILE=C:\Documents and Settings\Admin VS100COMNTOOLS=C:\VS.2010\Common7\Tools\ VS80COMNTOOLS=C:\VS.2005\Common7\Tools\ VS90COMNTOOLS=C:\VS.2008\Common7\Tools\ WINDIR=C:\WINDOWS WINDOWSSDKDIR=C:\PlatformSDK\. ... However, Microsoft Windows SDK installed on my computer in C:\PlatformSDK folder is a standalone SDK (!) downloaded ( ~500MB ) from Microsoft's web-site. >>... I can get VS2008 SP1 as well, should I install that instead?.. Yes, please try to install All SPs for Visual Studio 2008 and as a last resort try Repear option.
0 Kudos
TimP
Honored Contributor III
3,948 Views

I haven't had any luck with repair option for VS2008.  Unfortunately, that may mean installing from scratch and repeating service packs.  They must be installed in order, starting from the original VS2008.

0 Kudos
Manish_K_1
Beginner
3,948 Views

Sergey Kostrov wrote:

For example this is the list of environment variables after I've executed SET in the Command Prompt:
...
USERDOMAIN=SERGEYK
USERNAME=Admin
USERPROFILE=C:\Documents and Settings\Admin
VS100COMNTOOLS=C:\VS.2010\Common7\Tools\
VS80COMNTOOLS=C:\VS.2005\Common7\Tools\
VS90COMNTOOLS=C:\VS.2008\Common7\Tools\
WINDIR=C:\WINDOWS
WINDOWSSDKDIR=C:\PlatformSDK\.
...
However, Microsoft Windows SDK installed on my computer in C:\PlatformSDK folder is a standalone SDK (!) downloaded ( ~500MB ) from Microsoft's web-site.

>>... I can get VS2008 SP1 as well, should I install that instead?..

Yes, please try to install All SPs for Visual Studio 2008 and as a last resort try Repear option.

I have following on using SET command:

VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\
VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0
windir=C:\Windows

There is no WINDOWSSDKDIR variable on my computer.
Is there a way for setting this variable manually, or this can only be done by VS SDKs installation?

0 Kudos
Manish_K_1
Beginner
3,948 Views

TimP (Intel) wrote:

I haven't had any luck with repair option for VS2008.  Unfortunately, that may mean installing from scratch and repeating service packs.  They must be installed in order, starting from the original VS2008.

I have tried repair option in VS2008 with no luck. I also reinstalled it, but the same problem persists.

0 Kudos
SergeyKostrov
Valued Contributor II
3,948 Views
>>...Is there a way for setting this variable manually Yes and here are what you need to do: [ Start Button ] -> Settings -> Control Panel -> System -> Advanced ( property page ) -> Press Environment Variables button -> Set the variable WINDOWSSDKDIR
0 Kudos
Manish_K_1
Beginner
3,948 Views

Sergey Kostrov wrote:

>>...Is there a way for setting this variable manually

Yes and here are what you need to do:

[ Start Button ] -> Settings -> Control Panel -> System -> Advanced ( property page ) -> Press Environment Variables button -> Set the variable WINDOWSSDKDIR

It's finally working now!
I set environment variables, but when I used the SET command I could not see the WINDOWSSDKDIR variable even after restarting the computer. I also tried to add it to the User Variables along with System Variables with no luck. Then, I started intel command prompt through "run as administrator" and used SET command, and found WINDOWSSDKDIR variable present. Now, when I run the command prompt as administrator, it is working fine like before with VS2008 and Abaqus, and no error is encountered. 
Although I am happy that it is working, this is quite strange as I have the full administrative rights to the computer.

Thank you guys for your help. If you have an opinion as why it is working on "running as an administrator", though I am the administrator, do let me know.  

0 Kudos
tan__wei
Beginner
3,948 Views

Manish K. wrote:

Quote:

Sergey Kostrovwrote:

>>...Is there a way for setting this variable manually

Yes and here are what you need to do:

[ Start Button ] -> Settings -> Control Panel -> System -> Advanced ( property page ) -> Press Environment Variables button -> Set the variable WINDOWSSDKDIR

It's finally working now!
I set environment variables, but when I used the SET command I could not see the WINDOWSSDKDIR variable even after restarting the computer. I also tried to add it to the User Variables along with System Variables with no luck. Then, I started intel command prompt through "run as administrator" and used SET command, and found WINDOWSSDKDIR variable present. Now, when I run the command prompt as administrator, it is working fine like before with VS2008 and Abaqus, and no error is encountered. 
Although I am happy that it is working, this is quite strange as I have the full administrative rights to the computer.

Thank you guys for your help. If you have an opinion as why it is working on "running as an administrator", though I am the administrator, do let me know.  

Hi  Manish,

I meet a similiar problem with you (Link the abaqus, fortran and VS). I was wondering if you have got it fixed. I have checked the "CurrentInstallFolder" in registry and created  environment variable, but still cannot find the WindowsSdkDir. Could you help me. Thank you very much!

David 

0 Kudos
Manish_K_1
Beginner
3,948 Views

David,

Did you try "run as administrator" option? I have everything else in the right place and solution was just to use "run as administrator" option.

0 Kudos
tan__wei
Beginner
3,948 Views

Manish K. wrote:

David,

Did you try "run as administrator" option? I have everything else in the right place and solution was just to use "run as administrator" option.

Hi Manish,

Thanks a lot. My problem is fixed. After I have set the environment variable and run the code (do not need run as adminstrator, cause I am already admin) in abaqus command, I met the problem that "Abaqus commands not found", then I got it fixed according to

http://simulia.custhelp.com/cgi-bin/abaqus.cfg/php/enduser/std_adp.php?p_faqid=2054&p_created=1087851828.

Finally, my code can work like before. 

Thanks for the help of you guys.

Cheers,

David

0 Kudos
Atefe_g_
Beginner
3,948 Views

Hi  Manish,

I have a similar problem with your before problem. What's the meaning of setting the variable WINDOWSSDKDIR . I Wrote "WINDOWSSDKDIR" by variable and "C:\PlatformSDK\." by value on Environment variables window. Is it right? Could you help me. Thank you very much!

Best regards,

Atefe

 

0 Kudos
Steven_L_Intel1
Employee
3,948 Views

$(WindowsSDKDir) in the list of directories means that Visual Studio should translate the environment variable WindowsSDKDir (case doesn't matter) to find the Windows SDK. This variable is created by Visual Studio in the build environment based on registry entries - you would not see it outside Visual Studio.

C:\PlatformSDK is probably not what you want to use here. Which version of Visual Studio are you using?

0 Kudos
Atefe_g_
Beginner
3,948 Views

Hi Steve,

I didnt find C:\PlatformSDK.

I use visual Studio 2008

 

0 Kudos
Steven_L_Intel1
Employee
3,948 Views

Ok. In Tools > Options > Intel Composer XE > Compilers, click the ... button to the right of Executables. Add to the end of the list of folders:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin

Do the same for Libraries and put in this:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib

and lastly for Includes:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include

If you are building 64-bit applications, select Platform > x64 on this screen and repeat the above steps, except for Libraries use:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\x64

Remove any setting you made for Environment.

0 Kudos
Atefe_g_
Beginner
3,948 Views

Dear Steve,

Thanks for your valuable response and sorry for my delay!

I use Intel(R) Visual Fortran 11.1.060. Then I should enter this: "C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\bin". Is it right?

I did steps that you said but I still get that error.

Regards,

 

 

0 Kudos
Steven_L_Intel1
Employee
3,948 Views

Where are you entering this? First of all, does that directory I gave you exist and are there files in it, such as rc.exe?

0 Kudos
Atefe_g_
Beginner
3,348 Views

I entered those in address you said (visual studio>Tools>Options>...)

However in my C driver, there are Program Files(x86) and Program Files.In "Program Files(x86)> Microsoft SDKs> windows" there are two folders:

1) v5.0: there are "Include" and "Lib" folders.

2) v6.0A: there are just "Bootstrapper" and "bin" folders that "bin" is empty!!

But there are this address: Program Files> Microsoft SDKs> windows> v6.0A > all of folders (Bin, Include, Lib, FXCop)

and all of folders are full.

Thanks,

0 Kudos
Reply