[MPICH] LoadLibrary("mpich2d.dll") fails, how can I link statically on Windows?

Robin Boerdijk robin_boerdijk at yahoo.com
Thu Aug 18 03:30:50 CDT 2005


Hi all,

I have a weird problem on Windows. When I link a big static library
(3MB) into my MPI program, my MPI program does not start anymore.
Instead, Windows pops up a message box saying "The application failed
to initialize properly (0xc0000142)". When I catch this exception in
the debugger, it breaks at the LoadLibrary(dll_name) line in the
LoadFunctions() function in mpi.c. When I don't link in the big static
library, this doesn't happen and my MPI program runs normally.

Question #1: What could cause this and is there an easy solution?

As a workaround I want to avoid using the dynamic library loading done
by mpi.c and link the MPI library statically into my MPI program. 

Question #2: How can I statically link the MPI library into my MPI
program?

I'm building MPI myself from source so I am able to tweak the build
process if needed. I just need to know what to tweak.

Thanks,

Robin Boerdijk

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the mpich-discuss mailing list