[mpich-discuss] Compiling with mpich2`

Dave Goodell goodell at mcs.anl.gov
Tue Jan 25 09:13:16 CST 2011


How are you including "mpi.h" in your code?  Is it inside of an `extern "C" {}' block?  If so, it shouldn't be.

-Dave

On Jan 24, 2011, at 10:10 PM CST, Norman Lo wrote:

> Hi all,
> 
> I am trying to compile a program called A++P++ with mpich2-1.3.1. I am getting an error about conflicting C functions and below is the detailed message. Could anyone help me on this ? Thank you very much with any help.
> 
> Norman
> 
> mpicxx -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I. -I../.. -I../../include -I/hivehomes/normanlo/MPI2-1.3/include -I../../PARTI -I../../PARTI -I/hivehomes/normanlo/MPI2-1.3/include -O -Wstrict-prototypes -fPIC -c -o MPI_specific.o `test -f MPI_specific.C || echo './'`MPI_specific.C
> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
> /hivehomes/normanlo/MPI2-1.3/include/mpicxx.h:2699: error: declaration of C function ‘void MPI::Init(int&, char**&)’ conflicts with
> /hivehomes/normanlo/MPI2-1.3/include/mpicxx.h:2698: error: previous declaration ‘void MPI::Init()’ here
> /hivehomes/normanlo/MPI2-1.3/include/mpicxx.h:2701: error: declaration of C function ‘int MPI::Init_thread(int&, char**&, int)’ conflicts with
> /hivehomes/normanlo/MPI2-1.3/include/mpicxx.h:2700: error: previous declaration ‘int MPI::Init_thread(int)’ here
> gmake[3]: *** [MPI_specific.o] Error 1
> 
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss



More information about the mpich-discuss mailing list