<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16674" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=085550115-04082008>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=085550115-04082008> Since your MPI program requires MPICH2 (an
"Additional" lib apart from the libs provided with VS) you need to specify the
paths for the header files ("Additional Include directories") and the
library files ("Additional library directories") when compiling your program. In
the project properties, look for the "C/C++ --> General" settings
to set the path for include directories and "Linker-->General" settings to
set the path for MPICH2 libs. After setting the path correctly specify the
MPICH2 libs (cxx.lib & mpi.lib for C++ programs) in the "Additional
dependencies" section (Look for "Linker-->Input") of the project
properties.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=085550115-04082008> Note that the MPI include files are provided in
<INSTALL-PATH>\MPICH2\include & the libs are provided in
<INSTALL-PATH>\MPICH2\lib (where <INSTALL-PATH> is your install
directory --- Usually the paths are "C:\program files\MPICH2\include" &
"C:\program files\MPICH2\lib").</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=085550115-04082008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=085550115-04082008> Let us know if you need any further
help.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=085550115-04082008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=085550115-04082008>(PS: Since Visual Studio C++ runtime libs are not
backward compatible we recommend users to use VS 2005 to compile their C++ MPI
programs with the latest version of MPICH2 libs.)</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=085550115-04082008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=085550115-04082008>Regards,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=085550115-04082008>Jayesh</SPAN></FONT></DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma size=2><B>From:</B>
owner-mpich-discuss@mcs.anl.gov [mailto:owner-mpich-discuss@mcs.anl.gov] <B>On
Behalf Of </B>Gholamreza Sobhaninejad<BR><B>Sent:</B> Sunday, August 03, 2008
7:48 PM<BR><B>To:</B> mpich-discuss@mcs.anl.gov<BR><B>Subject:</B> Re:
[mpich-discuss] C++ for Visual studio code<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>Hi rebecca, <BR>I was using vs 2005 and vs 2008. But since there
are some inconsistencies between VS compilers and Linux based compilers, I am
not using VS for programming. <BR>I wanna suggest you if you are going to
use clusters which use Linux OP just move to Netbeans or Eclipse IDEs and
compile your code with GNU or Intel compileres. <BR>Anyway, as I see you are in
correct tab but please have a look in Input,System and Advanced section too. It
should be somewhere there. <BR>Additional libraries directory should be set to
MPI->LIB directory. But still you need to link mpichxx and mpich to your
code. <BR><BR>Please don't hesitate to ask
question.<BR><BR>Sincerely,<BR><BR>Reza<BR><BR>
<DIV class=gmail_quote>On Mon, Aug 4, 2008 at 9:18 AM, Rebecca <SPAN
dir=ltr><<A
href="mailto:rebeccakern@sbcglobal.net">rebeccakern@sbcglobal.net</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV lang=EN-US vlink="blue" link="blue">
<DIV>
<P><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thank you for
responding Reza! I am having trouble seeing the additional dependencies
in VS .NET 2003. What version of VS do you use?</SPAN></FONT></P>
<P><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><IMG height=438
src="cid:085550115@04082008-0ADD" width=646></SPAN></FONT></P>
<P><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<DIV>
<DIV style="TEXT-ALIGN: center" align=center><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> <A
href="mailto:owner-mpich-discuss@mcs.anl.gov"
target=_blank>owner-mpich-discuss@mcs.anl.gov</A> [mailto:<A
href="mailto:owner-mpich-discuss@mcs.anl.gov"
target=_blank>owner-mpich-discuss@mcs.anl.gov</A>] <B><SPAN
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Gholamreza
Sobhaninejad<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Saturday,
August 02, 2008 9:18 PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
<A href="mailto:mpich-discuss@mcs.anl.gov"
target=_blank>mpich-discuss@mcs.anl.gov</A><BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [mpich-discuss] C++ for
Visual studio code</SPAN></FONT></P></DIV>
<P><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<DIV>
<P style="MARGIN-BOTTOM: 12pt"><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">Hi Rebecca,<BR><BR>When you use MPICH with C++ , you
need to link "mpicxx" and "mpich" libraries. you can determine this two file
in project properties/ Linker/Additional
Dependencies.<BR><BR>Reza</SPAN></FONT></P>
<DIV>
<P><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">On Sun,
Aug 3, 2008 at 8:13 AM, Rebecca <<A href="mailto:rebeccakern@sbcglobal.net"
target=_blank>rebeccakern@sbcglobal.net</A>> wrote:</SPAN></FONT></P>
<DIV vlink="purple" link="blue">
<DIV>
<P><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I
am having trouble accessing the MPI.h library from C++ in Visual Studio.
I am getting an unresolved external symbol for MPI::Init() and if I try to use
MPI_Init() the code ends unexpectedly. I am able to use MPI_Init() in c
without any problem. Does anyone have sample code I could see with
C++?</SPAN></FONT></P></DIV></DIV></DIV>
<P><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"><BR><FONT
color=#888888><BR clear=all><BR>-- <BR>Gholamreza Sobhaninejad(Reza)<BR>PhD
candidate, University of Tokyo<BR>Earthquake Research Institute<BR>Tel:
090-9807-2477</FONT></SPAN></FONT></P></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR><BR
clear=all><BR>-- <BR>Gholamreza Sobhaninejad(Reza)<BR>PhD candidate, University
of Tokyo<BR>Earthquake Research Institute<BR>Tel:
090-9807-2477<BR></DIV></BODY></HTML>