<div>hi,</div><div>i'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 "mpi.h"<br>#include <stdio.h><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(&argc,&argv);<br>
        printf("Hello MPI\r\n");<br><br>        MPI_Comm_size(MPI_COMM_WORLD,&numberOfProcessor);<br>        printf("jumlah processor=%d\r\n",numberOfProcessor);<br><br><br>        MPI_Comm_rank(MPI_COMM_WORLD,&rank);<br>
        printf("proses pada %d\r\n",rank);<br><br>        MPI_Finalize();<br>        return 0;<br>}<br></div><div><br></div><div><br></div><div>for "Additional Include Directories" added by "mpich2/include", "Additional Library Directories" added by "mpich2/lib" and "Additional Dependencies" added "cxx.lib,mpe.lib,mpi.lib".</div>
<div>but, if i debug this program, there's error :</div><div><br></div><div>1>------ Build started: Project: HelloMPI2, Configuration: Debug Win32 ------<br>1>hello_mpi2.obj : error LNK2019: unresolved external symbol _MPI_Finalize referenced in function _main<br>
1>hello_mpi2.obj : error LNK2019: unresolved external symbol _MPI_Comm_rank referenced in function _main<br>1>hello_mpi2.obj : error LNK2019: unresolved external symbol _MPI_Comm_size referenced in function _main<br>
1>hello_mpi2.obj : error LNK2019: unresolved external symbol _MPI_Init referenced in function _main<br>1>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't know what exactly went wrong with the process.</div><div><br>Thanks. <br></div>