title: Running simple fortran programs using Intel Visual Fortran + Microsoft Visual Studio
body: <p>I have recently acquired a copy of Microsoft Visual Studio 2012 and Intel Parallel Studio Visual Fortran Compiler XE 2013. </p>
  
  <p>I am familiar with neither the use of Microsoft Visual Studio nor Fortran as a programming language in general. My objective is to come up with a simple construct/framework in which I can generate and test basic Fortran programs/output in order to learn the Fortran language. This would be similar to using a basic Fortran compiler such as GNU and running things like "hello world" type programs through the command prompt. I am however restricted to the two applications above for reasons not relevant to discuss here. </p>
  
  <p>It seems that Visual Studio does not allow the user to compile/build individual source files if they are not playing some kind of role in the more general project solution (One would have to create, compile and build a separate project for each tiny Fortran program). As described by <a href="https://www.reddit.com/r/cpp/comments/3ikcli/why_cant_you_run_a_single_c_file_in_visual_studio/" rel="nofollow noreferrer">this</a> post, Visual Studio does not allow this for apparently very good reasons.</p>
  
  <p>I also found <a href="https://www.youtube.com/watch?v=-E0gTgIPXRU" rel="nofollow noreferrer">this</a> video which describes an apparently simple way to use the <code>ifort</code> command in order to compile and run a simple Fortran program using Intel Visual Fortran. Unfortunately when I try this on my OS, I get the following error message:</p>
  
  <pre><code>ifort: error #10037: could not find 'link'
  </code></pre>
  
  <p>Although it does successfully generate an object file with the same name, though no executable.</p>
  
  <p>The plausible fix to this error is the following quote which I found on an Intel <a href="https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/278472" rel="nofollow noreferrer">forum</a></p>
  
  <blockquote>
    <p>"the error "cannot find link" is almost always caused by not
    installing the 64-bit compiler and tools component of Visual Studio"</p>
  </blockquote>
  
  <p>I do not have administrator privileges on this machine for similar reasons to those for which I am only restricted to the above two applications. For this reason I cannot apply the above fix. Furthermore I do not believe the compiler is not working for this reason.</p>
  
  <p>Again, all I need is a straightforward way to write, compile and run simple Fortran code. As mentioned above, I have attempted several ideas and so my only option is to solicit guidance. Since Visual Studio can build commercial quality applications and Visual Fortran can perform parallel processing with Fortran, I am inclined to think these should be able to cover this basic need.</p>
  
  <p>EDIT</p>
  
  <p>I just ran ifortvars.bat in windows cmd and still get the same error. Please see below  for ifortvars output.</p>
  
  <p><a href="https://i.stack.imgur.com/X1jOg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X1jOg.png" alt="enter image description here"></a></p>
  
  <p>EDIT 2</p>
  
  <p>In response to Steve's answer, here are a few commands I ran using the Intel Fortran command prompt. As you can see the problem persists.</p>
  
  <p><a href="https://i.stack.imgur.com/5pBeo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5pBeo.png" alt="enter image description here"></a></p>