id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc
636	MPICH2 and .NET issues	"""T. Farago"" <farago1@…>"	jayesh	"

{{{

My project is built with the ""multi-threaded DLL"" runtime library
using MSVC 2008.

For MPI I include <mpi.h> and its two library files cxx.lib and
mpi.lib. Simply compiling and linking the project results in the
following error(s):

Linking...
LIBCMT.lib(hooks.obj) : error LNK2005: ""void __cdecl terminate(void)""
(?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(stdexcpt.obj) : error LNK2005: ""public: __thiscall
std::exception::exception(class std::exception const &)""
(??0exception@std@@QAE@ABV01@@Z) already defined in
MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(stdexcpt.obj) : error LNK2005: ""public: virtual char const
* __thiscall std::exception::what(void)const ""
(?what@exception@std@@UBEPBDXZ) already defined in
MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(typinfo.obj) : error LNK2005: ""public: void __thiscall
type_info::_type_info_dtor_internal_method(void)""
(?_type_info_dtor_internal_method@type_info@@QAEXXZ) already defined
in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(typinfo.obj) : error LNK2005: ""private: __thiscall
type_info::type_info(class type_info const &)""
(??0type_info@@AAE@ABV0@@Z) already defined in MSVCRT.lib(ti_inst.obj)
LIBCMT.lib(typinfo.obj) : error LNK2005: ""private: class type_info &
__thiscall type_info::operator=(class type_info const &)""
(??4type_info@@AAEAAV0@ABV0@@Z) already defined in
MSVCRT.lib(ti_inst.obj)
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of
other libs; use /NODEFAULTLIB:library
I:\trunk\bin\Release\graph.exe : fatal error LNK1169: one or more
multiply defined symbols found


So I ignore ""libcmt.lib"" and get the following warning(s):

graph.obj : warning LNK4248: unresolved typeref token (01000066) for
'ADIOI_FileD'; image may not run
cxx.lib(initcxx1.obj) : warning LNK4099: PDB 'vc80.pdb' was not found
with 'C:\MPICH2\lib\cxx.lib' or at 'i:\trunk\bin\Release\vc80.pdb';
linking object as if no debug info

The program crashes at startup during initialisation saying something
about ""unhandled exception of type System.TypeInitializationException
in Unknown Module""

How can this be solved?
Best regards,
T. Farago
}}}"	bug	closed	major	mpich2-1.1.1	mpich2	wontfix		
