title: (Error) Undefined reference to MPI on Dev C++
body: <p>I have an assignment to make simple program using MPI. After I try a Hello World program in Dev C++ using mpi.h header and compile it, the makefile.win is appearing and following error is coming</p>
  
  <pre><code>D:\Assignment\Project\MPI\tesmpi.o tesmpi.cpp:(.text+0x21): undefined reference to `MPI_Init'
  D:\Assignment\Project\MPI\tesmpi.o  tesmpi.cpp (.text$_ZN3MPI9IntracommC2Ev[__ZN3MPI9IntracommC2Ev]+0xf): undefined reference to `MPI::Comm::Comm()'
  ... and other 190 errors like that
  D:\Assignment\Project\MPI\[Error] id returned 1 exit status
  D:\Assignment\Project\MPI\recipe for target 'Project' failed
  </code></pre>
  
  <p>I already input the library and include directory in Project Options also the linker with msmpi.lib. Eh, by the way I use Microsoft MPI and Microsoft SDK for the MPI. Is there anything that I can do?</p>
  
  <p>this is my program</p>
  
  <pre><code>#include &lt;mpi.h&gt;
  #include &lt;stdio.h&gt;
  
  int main(int argc, char** argv) {
      // Initialize the MPI environment
      MPI_Init(NULL, NULL);
  
      // Get the number of processes
      int world_size;
      MPI_Comm_size(MPI_COMM_WORLD, &amp;world_size);
  
      // Get the rank of the process
      int world_rank;
      MPI_Comm_rank(MPI_COMM_WORLD, &amp;world_rank);
  
      // Get the name of the processor
      char processor_name[MPI_MAX_PROCESSOR_NAME];
      int name_len;
      MPI_Get_processor_name(processor_name, &amp;name_len);
  
      // Print off a hello world message
      printf("Hello world from processor %s, rank %d" " out of %d processors\n",
         processor_name, world_rank, world_size);
  
      // Finalize the MPI environment.
      MPI_Finalize();
  </code></pre>
  
  <p>}</p>