[mpich-discuss] function declaration conflicts in mpicxx.h

Rajeev Thakur thakur at mcs.anl.gov
Mon Jan 25 13:12:00 CST 2010


Try compiling the C++ example in the examples/cxx directory using
mpicxx. Make sure you use the mpicxx from the installed version of
MPICH2.
 
Rajeev


  _____  

From: mpich-discuss-bounces at mcs.anl.gov
[mailto:mpich-discuss-bounces at mcs.anl.gov] On Behalf Of Yang Xin
Sent: Friday, January 22, 2010 11:34 PM
To: mpich-discuss at mcs.anl.gov
Subject: Re: [mpich-discuss] function declaration conflicts in mpicxx.h


I resend my mail to the mail list due to the last one is pending for
administrator's review. Please help, thanks very much.

Regards,
Xin


On Fri, Jan 22, 2010 at 11:04 PM, Yang Xin <zincumyx at gmail.com> wrote:


Hi all,

  I am new to MPI programming, and stacking in a conflict problem during
compiling. Declarations of function MPI::Init(int&, char**&) and
MPI::Init(), which are in mpicxx.h, conflict when my codes include
mpicxx.h. The following is the compile command:

  "g++  -I/home/zincum/apps/mpich2/include -I.
-I/home/zincum/apps/NF+GrACE/GrACE/include
-I/home/zincum/apps/HDF4/include
-I/home/zincum/apps/NF+GrACE/GrACE/packages/vampire/include
-DBEOWULF_ABSOFT -DWant_c_files  -DANSI_HEADERS  -g -c CommServer.cpp"

  Other compilers, such as gcc, mpicc, mpiCC, mpicxx, have been tried,
but none works.

  Here is the detail error message:
  
  "/home/zincum/apps/mpich2/include/mpicxx.h:2683: error: declaration of
C function void MPI::Init(int&, char**&) conflicts with
   /home/zincum/apps/mpich2/include/mpicxx.h:2682: error: previous
declaration void MPI::Init() here
   /home/zincum/apps/mpich2/include/mpicxx.h:2685: error: declaration of
C function int MPI::Init_thread(int&, char**&, int) conflicts with
   /home/zincum/apps/mpich2/include/mpicxx.h:2684: error: previous
declaration int MPI::Init_thread(int) here
  "

  Thanks in advance.

Regards,
Xin



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20100125/b15843fc/attachment.htm>


More information about the mpich-discuss mailing list