<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:宋体, simsun, serif;font-size:12pt;color:#000000;"><DIV><FONT face="lucida console, sans-serif"></FONT></DIV>
<DIV>
<DIV><FONT face="lucida console, sans-serif">Hello, I have installed GCC & MPICH2-1.2.1p1 for windows with editplus 3 on my winows 7 platform. I configure them following the"README.winbin"file in mpich2.</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">and It works well with c/fortran.</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif"> </FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">but if i use the c++ mode, which means, using "MPI::Int(), MPI::COMM_WORLD.Getsize(),etc." instead of "MPI_Init(&argc,&argv),MPI_Comm_size(MPI_COMM_WORLD,&size).etc" , It failed .</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif"> </FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">If the source file has any grammar mistake, when compling, the g++ can point it out.</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif"> </FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">After I correct them, when I build them again, It shows :</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">-------------------------------------------------------------</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">C:\Users\Vikram\AppData\Local\Temp\ccKmyYIt.o:mpi_derived.cpp:(.text+0x5f): unde<BR>fined reference to `MPI::Init()'<BR>C:\Users\Vikram\AppData\Local\Temp\ccKmyYIt.o:mpi_derived.cpp:(.text+0x66): unde<BR>fined reference to `MPI::COMM_WORLD'<BR>C:\Users\Vikram\AppData\Local\Temp\ccKmyYIt.o:mpi_derived.cpp:(.text+0x9c): unde<BR>fined reference to `MPI::DOUBLE'<BR>C:\Users\Vikram\AppData\Local\Temp\ccKmyYIt.o:mpi_derived.cpp:(.text+0x201): und<BR>efined reference to `MPI::COMM_WORLD'<BR>C:\Users\Vikram\AppData\Local\Temp\ccKmyYIt.o:mpi_derived.cpp:(.text+0x233): und<BR>efined reference to `MPI::COMM_WORLD'<BR>C:\Users\Vikram\AppData\Local\Temp\ccKmyYIt.o:mpi_derived.cpp:(.text+0x26a): und<BR>efined reference to `MPI::COMM_WORLD'<BR>C:\Users\Vikram\AppData\Local\Temp\ccKmyYIt.o:mpi_derived.cpp:(.text+0x316): und<BR>efined reference to
`MPI::DOUBLE'<BR>C:\Users\Vikram\AppData\Local\Temp\ccKmyYIt.o:mpi_derived.cpp:(.text+0x32c): und<BR>efined reference to `MPI::COMM_WORLD'<BR>C:\Users\Vikram\AppData\Local\Temp\ccKmyYIt.o:mpi_derived.cpp:(.text+0x3b7): und<BR>efined reference to `MPI::Finalize()'<BR>C:\Users\Vikram\AppData\Local\Temp\ccKmyYIt.o:mpi_derived.cpp:(.text$_ZN3MPI8Dat<BR>atypeC1Ev[MPI::Datatype::Datatype()]+0x8): undefined reference to `vtable for MP<BR>I::Datatype'<BR>C:\Users\Vikram\AppData\Local\Temp\ccKmyYIt.o:mpi_derived.cpp:(.text$_ZN3MPI8Dat<BR>atypeD1Ev[MPI::Datatype::~Datatype()]+0xb): undefined reference to `vtable for M<BR>PI::Datatype'<BR>collect2: ld returned 1 exit status<BR>Press any key to continue....</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">----------------------------------------------------------</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">However ,if I replace all the MPI::XXX kind (C++ mode )to MPI_XXX( C mode ), It works. Every thing is well</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">I don't know why, can you help me?</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif"> </FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">---</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">when compiling I use the following command:</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">g++ -I D:\MPICH2\include -L D:\MPICH2\lib $(FileName) -o $(FileNameNoExt) -lmpi</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif"> </FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">---</FONT></DIV>
<DIV><FONT face="lucida console, sans-serif">Waiting for your Reply. Wish everything well for you!</FONT></DIV><BR><FONT face="lucida console, sans-serif"> </FONT></DIV>
<DIV><FONT face="lucida console, sans-serif"><FONT size=2>------</FONT><FONT size=2>---------------------------------------------</FONT></FONT></DIV>
<DIV><FONT face="lucida console, sans-serif"><FONT style="FONT-FAMILY: tahoma, new york, times, serif; FONT-WEIGHT: bold" size=2>孔涛</FONT><FONT style="FONT-FAMILY: arial, helvetica, sans-serif" size=2> </FONT><FONT size=2> 山东大学数学学院</FONT></FONT></DIV>
<DIV><FONT face="lucida console, sans-serif"></FONT></DIV></div><br>
</body></html>