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

Win7 SDK 7.1 compiler environment problem

David_R_1
Beginner
601 Views

I have a Windows 7 x64 computer running Composer XE 2013 with Visual Studio 2010 Shell.  After installing SDK 7.1, the Intel 64 command window displays a message on startup that "The specified configuration type is missing.  The tools for the configuration might not be installed."  Attempts to compile and link source code files result in error #10037: could not find 'link'.  The Intel 64 command window function was working correctly before installation of SDK 7.1.

It appears that installation of SDK 7.1 has corrupted the x64 compiler environment.  This problem was alluded to in another post, https://software.intel.com/en-us/forums/topic/407622, however no solution was listed.

Does anyone have a fix for this?

Dave R.

0 Kudos
5 Replies
Steven_L_Intel1
Employee
601 Views

I tried to install that SDK but it failed. Looking at the ifort configuration scripts, my guess is that the SDK defines the system environment variable VS100COMNTOOLS, which the Fortran scripts are not expecting if the shell is being used. Try this and see what happens.

Edit the file compilervars_arch.bat in the bin folder of your Fortran version. Find this code:

::VS2010
if /i "%TARGET_VS%"=="vs2010" (
  if defined VS100COMNTOOLS (
    if exist "%VS100COMNTOOLS%..\IDE\devenv.exe" (
      if exist "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" (
         set MSVS_VAR_SCRIPT="%VS100COMNTOOLS%..\..\VC\vcvarsall.bat"
         goto Calls
      )
    )
  )

  if defined VSSHELL2010INSTALLDIR (
    if exist "%ROOT%\bin\vsshell2010vars_arch.bat" (
      set MSVS_VAR_SCRIPT="%ROOT%\bin\vsshell2010vars_arch.bat"
      goto Calls
    )
  )

Change it to look like this (swapping the two "if defined" sections):

::VS2010
if /i "%TARGET_VS%"=="vs2010" (
  if defined VSSHELL2010INSTALLDIR (
    if exist "%ROOT%\bin\vsshell2010vars_arch.bat" (
      set MSVS_VAR_SCRIPT="%ROOT%\bin\vsshell2010vars_arch.bat"
      goto Calls
    )
  )

  if defined VS100COMNTOOLS (
    if exist "%VS100COMNTOOLS%..\IDE\devenv.exe" (
      if exist "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" (
         set MSVS_VAR_SCRIPT="%VS100COMNTOOLS%..\..\VC\vcvarsall.bat"
         goto Calls
      )
    )
  )

Make sure you are invoking the compilervars.bat file with vs2010 explicitly specified as the second argument. (If you leave it off, different code gets executed.)

0 Kudos
David_R_1
Beginner
601 Views

Steve,

It looks like this fixed the problem.

Greatly appreciate the help.

Dave R.

0 Kudos
Steven_L_Intel1
Employee
601 Views

Good. You'll either have to make this change on each Fortran update, or perhaps edit the system environment variables and delete the definition of VS100COMNTOOLS.

0 Kudos
David_R_1
Beginner
601 Views

I did test the Intel x64 Command Line bug by deleting the VS100COMNTOOLS variable to see what would happen, prior to modifying the compilervars_arch.bat file.  That also fixed the x64 command line configuration error.

However, Matlab uses the VS100COMNTOOLS variable to configure the Fortran compiler for mex file compilation, so I can't delete that variable without causing other problems with Matlab/Fortran integration.

 

0 Kudos
Steven_L_Intel1
Employee
601 Views

It was a suggested alternative. I will ask the developers to consider rearranging our .bat file.

0 Kudos
Reply