[MPICH] Having Problems When Linking with Microsoft Visual C++ 6.0

Sertaç Cinel scinel at gmail.com
Sun Oct 29 18:46:26 CST 2006


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/fbdb95db/attachment.htm>


More information about the mpich-discuss mailing list