<div>hi,</div><div>i&#39;m beginner mpi programmer.<br></div><div><br></div><div>i try simple program use ide microsoft visual c++ 2010 express on windows 7 (64bit).</div><div><br></div><div>code:</div><div><br></div><div>
#include &quot;mpi.h&quot;<br>#include &lt;stdio.h&gt;<br><br>int main (int argc,char* argv[]){<br>        int numberOfProcessor;<br>        int rank;<br>        int namelen;<br>        char processor_name[MPI_MAX_PROCESSOR_NAME];<br>        <br>        MPI_Init(&amp;argc,&amp;argv);<br>
        printf(&quot;Hello MPI\r\n&quot;);<br><br>        MPI_Comm_size(MPI_COMM_WORLD,&amp;numberOfProcessor);<br>        printf(&quot;jumlah processor=%d\r\n&quot;,numberOfProcessor);<br><br><br>        MPI_Comm_rank(MPI_COMM_WORLD,&amp;rank);<br>
        printf(&quot;proses pada %d\r\n&quot;,rank);<br><br>        MPI_Finalize();<br>        return 0;<br>}<br></div><div><br></div><div><br></div><div>for &quot;Additional Include Directories&quot; added by &quot;mpich2/include&quot;, &quot;Additional Library Directories&quot; added by &quot;mpich2/lib&quot; and &quot;Additional Dependencies&quot; added &quot;cxx.lib,mpe.lib,mpi.lib&quot;.</div>
<div>but, if i debug this program, there&#39;s error :</div><div><br></div><div>1&gt;------ Build started: Project: HelloMPI2, Configuration: Debug Win32 ------<br>1&gt;hello_mpi2.obj : error LNK2019: unresolved external symbol _MPI_Finalize referenced in function _main<br>
1&gt;hello_mpi2.obj : error LNK2019: unresolved external symbol _MPI_Comm_rank referenced in function _main<br>1&gt;hello_mpi2.obj : error LNK2019: unresolved external symbol _MPI_Comm_size referenced in function _main<br>
1&gt;hello_mpi2.obj : error LNK2019: unresolved external symbol _MPI_Init referenced in function _main<br>1&gt;C:\Users\titia\documents\visual studio 2010\Projects\HelloMPI2\Debug\HelloMPI2.exe : fatal error LNK1120: 4 unresolved externals<br>
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========<br><br><br></div><div>I don&#39;t know what exactly went wrong with the process.</div><div><br>Thanks. <br></div>