[mpich-discuss] Hi
Jayesh Krishna
jayesh at mcs.anl.gov
Wed Feb 4 10:12:38 CST 2009
Hi,
The linker error indicates that you have not specified the MPICH2
libraries as "Additional dependencies" for the linker.
Specify the path of MPICH2 libraries (the default path is "c:\program
files\mpich2\lib") in "Additional library directories" (Project properties
--> Configuration properties --> Linker --> Additional library
directories). Specify the MPICH2 libraries (mpi.lib) as "Additional
dependencies" (Project properties --> Configuration properties --> Linker
--> Input --> Additional dependencies).
You can find this information in the windows developer's guide (available
at
http://www.mcs.anl.gov/research/projects/mpich2/documentation/index.php?s=
docs). You can also refer to the example project files installed with
MPICH2 (examples\examples.sln).
Let us know if you still have problems.
Regards,
Jayesh
_____
From: kuldeep matarasi [mailto:kuldeep22011984 at yahoo.com]
Sent: Wednesday, February 04, 2009 9:57 AM
To: jayesh at mcs.anl.gov
Subject: Hi
Hello,
I'm a newbie in MPI ,i have a problem when trying to execute a "hello
world" application. I'm using
Microsoft Visual C++ 2005 on a Windows Machine and I have installed mpich2
on windows xp
I will be grateful to you if you could please help me fix.Thanks for your
time.
Regards
Kuldeep M
My code is:
#include "mpi.h"
#include <stdio.h>
int main( int argc, char *argv[] )
{
MPI_Init( &argc, &argv );
printf( "Hello, world!\n" );
MPI_Finalize();
return 0;
}
1>------ Build started: Project: mpihello.c, Configuration: Debug Win32
------
1>Linking...
1>mpihello.obj : error LNK2019: unresolved external symbol _MPI_Finalize
referenced in function _main
1>mpihello.obj : error LNK2019: unresolved external symbol _MPI_Init
referenced
in function _main
1>C:\Documents and Settings\kmatharasi\My Documents\Visual Studio
2005\Projects\mpihello.c\Debug\mpihello.c.exe : fatal error LNK1120: 2
unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\kmatharasi\My
Documents\Visual Studio
2005\Projects\mpihello.c\mpihello.c\Debug\BuildLog.htm"
1>mpihello.c - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20090204/61efb864/attachment.htm>
More information about the mpich-discuss
mailing list