[MPICH] Having Problems When Linking with Microsoft Visual C++ 6.0
Calin Iaru
calin at dolphinics.no
Mon Oct 30 02:39:45 CST 2006
Hi Sertaç,
you mentioned VC 6.0 as your application compiler. You should download
the latest Platform SDK and use the compiler from there. The link errors
below are generated due to the fact that the mpi library has been
compiled with a more recent version of MS C compiler which has added the
extra symbols. The Platform SDK can be found on
www.msdn.com/PlatformSDK; you can integrate the Platform SDK supplied
compiler with the IDE by using the msdev /useenv swich.
Best regards,
Calin
Sertaç Cinel wrote:
>
> 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
>
More information about the mpich-discuss
mailing list