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

PRJ0018 warning about missing environment variables

Gary_S_2
Beginner
2,422 Views

Hi,

I have just moved to a Win10 machine (Lenovo) and installed Intel Fortran (Parallel Studio XE 2011 with VS2008).  All seemed to go smoothly, but when I try compiling a simple (Hello World) program I get the following message:

warning PRJ0018 : The following environment variables were not found:
1>$(WindowsSdkDir)
1>$(FrameworkSDKDir)

I tried uninstalling and reinstalling, but it did not help.  I have been using the software on previous computers without similar difficulty.  Any ideas?  Thanks.

0 Kudos
9 Replies
mecej4
Honored Contributor III
2,422 Views

A bit of tentative probing here:

I believe that the missing environment-variables are used by Visual Studio and not by the Intel compilers.

Did you install the VS edition packaged with the compiler or did you install a pro- or higher edition of VS separately? Did you create the Hello project afresh or did you copy the project files from an older machine?

Can you open an IFort command window and build hello.exe there?

0 Kudos
Steven_L_Intel1
Employee
2,422 Views

Those environment variables are referenced in the lists of executables, libraries and includes in the compiler options in VS. They're set by Visual Studio based on registry entries created by the VS installer.

Are you building a Win32 or x64 configuration?  I would suggest uninstalling Fortran and Visual Studio. Reinstall VS2008 being sure to select "x64 Compilers and Tools" in the install options. Install any service packs available for VS2008. Then reinstall Parallel Studio XE.

0 Kudos
Gary_S_2
Beginner
2,422 Views

Thanks Steve and mecej4 for your very quick replies.  I uninstalled the Fortran and I separately uninstalled the Visual Studio 2008.  There were some C++ redistributable files that I did not touch.  I reinstalled the Fortran and it automatically reinstalled the Visual Studio 2008.  I further set the options to x64 release and prepared a brand new Hello World test program.  Unfortunately, none of this helped and I got the same error message PRJ0018,  Sorry, I was not able to try the IFort command because I am unfamiliar with running the compiler from the command prompt, I've always used the Visual Studio to manage things !  Any further suggestions ?

Many thanks.  Gary

0 Kudos
Gary_S_2
Beginner
2,422 Views

Hello again Steve,

I've been poking around anxiously trying to solve the problem of the missing environment variables, but still without luck.  I am out doing field work and so having a non-functioning system is quite a problem.  If possible, could you tell me what the needed environment variables are so that I can insert them manually?  Many thanks.

0 Kudos
Steven_L_Intel1
Employee
2,422 Views

Probably the best thing to do is to replace the usages of those variables with the full path. Go to Tools > Options > Intel Visual Fortran > Compilers (I think "Intel Visual Fortran" is the right name in that version, it may be different(. Click on the ... next to Executables, Libraries, Includes. Look for those names and replace them with the appropriate full path to what's on your computer WindowsSdkDir may be in various places, depending on what you have installed. Look in Program Files (x86)\Windows Kits\Windows\7.1 . For Libraries, you want the folder with kernel32.lib. For Executables, you want rc.exe. Note that the paths will be different for Win32 and x64 platforms. 

0 Kudos
Gary_S_2
Beginner
2,422 Views

Hello again Steve,

Thanks for the further info.  I substituted the following variables in the Tools ... boxes

FrameworkSDKDir =  C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\PlatformSDK\
WindowsSdkDir   =  C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\

and managed to avoid getting the PRJ0018 error message.  However, further issues continue.  It seems that the OutDir variable is also not set, so the output executable file could not be properly named.  I hardwired this to the expected name, but no obj or exe files were made.  The output message was

"Deleting intermediate files and output files for project 'QWin2', configuration 'Debug|Win32'.
1>QWin2 - 0 error(s), 0 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped =========="

Does this mean that the obj and exe files are being deliberately deleted?  I could not find any place to control such behavior.  I have no idea why my installation is so badly damaged, the computer is just one month old.  Over the years I have used the Digital, Compaq and Intel compilers on several different machines and have never experienced anything like this.

Thanks,  Gary

0 Kudos
Lorri_M_Intel
Employee
2,422 Views

This log looks like no files were built.   That is, that the build engine didn't find anything to do, so it said it succeeded (at doing nothing).

Not to ask too obvious a question, but are there files in your project?  What is the filename extension?  Are you using a standard ".f90" or ".f" or ".for", or a different extension?

          --Lorri

0 Kudos
Gary_S_2
Beginner
2,422 Views

Hello Lori,

Thanks, you are right.  It seems that something is wrong with the file connectivity within my Visual Studio environment.  I had opened the test .for file from within VS and usually VS automatically attaches it within the project.  This did not happen here, neither was the file even saved within the project folder, but in a distant place.  I moved the file across, added it to the project, but VS then put it into the wrong file group.  I then moved it to the source file group and then everything worked !

It seems that I shall need to do a bit of manual file management here, but at least the compiler works.  Thank you for your help and patience.

0 Kudos
Steven_L_Intel1
Employee
2,422 Views

See if https://software.intel.com/en-us/articles/problem-fortran-source-files-not-compiled-when-building-in-visual-studio helps.

0 Kudos
Reply