title: Why MPI doesn't work in Visual Studio 2015?
body: <p>I downloaded and installed <code>mpich2-1.0.8p1-win-x86-64.msi</code> from the console with the administrator rights. I created empty win32 console project, I created file code.cpp and I pasted this example code.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include "mpi.h"
  int main(int argc, char* argv[])
  {
      int ProcNum, ProcRank, RecvRank;
      MPI_Status Status;
      MPI_Init(&amp;argc, &amp;argv);
      MPI_Comm_size(MPI_COMM_WORLD, &amp;ProcNum);
      MPI_Comm_rank(MPI_COMM_WORLD, &amp;ProcRank);
      if (ProcRank == 0)
      { 
              printf("\n Hello from process %3d", ProcRank);
          for (int i = 1; i &lt; ProcNum; i++)
          {
              MPI_Recv(&amp;RecvRank, 1, MPI_INT, MPI_ANY_SOURCE,
                  MPI_ANY_TAG, MPI_COMM_WORLD, &amp;Status);
              printf("\n Hello from process %3d", RecvRank);
          }
      }
      else
          MPI_Send(&amp;ProcRank, 1, MPI_INT, 0, 0, MPI_COMM_WORLD);
      MPI_Finalize();
      return 0;
  }
  </code></pre>
  
  <p>Later I went to project properties to VC++ Directories and added include directories and library directories. In Linker/Input/Additional Dependencies I wrote mpi.lib and in C/C++/Language I allowed Open MP Support. When I compiled my project I have got strange errors. Can you help me? I can't understand what I made wrong, because I did it with tutorials.</p>
  
  <p><a href="https://i.stack.imgur.com/0yPuC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0yPuC.png" alt="errors"></a></p>