[MPICH] Having Problems When Linking with Microsoft Visual C++ 6.0 - pls read Windows developer's guide

Jayesh Krishna jayesh at mcs.anl.gov
Mon Oct 30 08:51:35 CST 2006


Hi,
 You do not have to change the MPICH2 header files (mpicxx.h) to compile
your program. You can define "HAVE_NO_VARIABLE_RETURN_TYPE_SUPPORT" in the
Preprocessor box for your project as mentioned in the Windows developer's
guide (available at http://www-unix.mcs.anl.gov/mpi/mpich/).
 Please let us know if you still have the problem. (Make sure that you do
not change any of the MPICH2 header files when you compile your program. If
you find any errors while compiling please contact us.)
 Also as a first step I would suggest you to try compiling the
projects/source code provided along with the MPICH2 installation(in the
examples directory). This will help you to determine whether you have the
right environment.
 
Regards,

----------------------------------
 Jayesh Krishna
 Argonne National Laboratory
 Mathematics and Computer Science
 Email: jayesh at mcs.anl.gov
---------------------------------- 

 

  _____  

From: owner-mpich-discuss at mcs.anl.gov
[mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Sertaç Cinel
Sent: Sunday, October 29, 2006 6:46 PM
To: mpich-discuss at mcs.anl.gov
Subject: [MPICH] Having Problems When Linking with Microsoft Visual C++ 6.0



Hello,

 

First of all I'm a newbie in MPI and I apologize for your time. I have a
problem when trying to execute a "hello world" application. I'm using
Microsoft Visual C++ 6.0 on a Windows Machine and I have installed
mpich2-1.0.3-1. 

 

My code is:

 

 

#include "mpi.h"

#include <iostream>

 

 

int main(int argc,char** argv)

{

            using namespace std;

  MPI::Init(argc, argv);

 

 

  int rank = MPI::COMM_WORLD.Get_rank();

  int size = MPI::COMM_WORLD.Get_size();

 

  cout << "Hello World! I am " << rank << " of " << size << endl;

 

  MPI::Finalize();

  return(0);

}

 

 

 

I have followed the instructions and added "C:\mpich2\include" to the
"Additional include directories" box. In Link Tab - CATEGORY:  Input I have
added cxxd.lib and mpi.lib (for debug version). I can compile the file by
adding  "#define HAVE_NO_VARIABLE_RETURN_TYPE_SUPPORT" to the top of
"mpicxx.h".

 

But when I link the code I get the following error:

 

 

Linking...

LINK : warning LNK4098: defaultlib "LIBCMTD" conflicts with use of other
libs; use /NODEFAULTLIB:library

cxxd.lib(initcxx1.obj) : error LNK2001: unresolved external symbol
__RTC_CheckEsp

cxxd.lib(initcxx1.obj) : error LNK2001: unresolved external symbol
__RTC_Shutdown

cxxd.lib(initcxx1.obj) : error LNK2001: unresolved external symbol
__RTC_InitBase

cxxd.lib(initcxx1.obj) : error LNK2001: unresolved external symbol
@_RTC_CheckStackVars at 8

cxxd.lib(initcxx1.obj) : error LNK2001: unresolved external symbol
__RTC_UninitUse

Debug/paralel_1.exe : fatal error LNK1120: 5 unresolved externals

Error executing link.exe.

 

paralel_1.exe - 6 error(s), 1 warning(s)

 

I would be appreciated if you can help.

Thanks,

Sertaç CİNEL

Middle East Technical University

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20061030/a7c73222/attachment.htm>


More information about the mpich-discuss mailing list