[mpich-discuss] Compiling with mpich2`

Norman Lo normanlo at cs.umd.edu
Tue Jan 25 13:08:27 CST 2011


Thank you for your suggestion.

I don't see any mpi.h included in any extern "C" {} blocks. Could there 
be other reasons ?

Thanks,

Norman

On 01/25/2011 10:13 AM, Dave Goodell wrote:
> 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
> _______________________________________________
> 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