Problem 404 - enum G4ApplicationState makes conflict with other libraries
Summary: enum G4ApplicationState makes conflict with other libraries
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: intercoms (show other problems)
Version: 4.1
Hardware: Other Linux
: P2 normal
Assignee: Makoto.Asai
URL:
Depends on:
Blocks:
 
Reported: 2002-08-30 04:17 CEST by Mario.Schubert
Modified: 2002-12-05 10:49 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Mario.Schubert 2002-08-30 04:17:27 CEST
Hello,

I am trying to combine GEANT4.4.1 with mpich++, but the following problem arises:

/scratch/rbs/schubert/local/include/mpi2c++/functions_inln.h: In function `void PMPI::Init ()':
/scratch/rbs/schubert/local/include/mpi2c++/functions_inln.h:113: `void PMPI::Init ()' redeclared as
different kind of symbol
/scratch/rbs/schubert/install/geant4.4.1/source/global/management/include/G4ApplicationState.hh:83: previous
declaration of `G4ApplicationState Init'

This is because C++ does not allow the following declaration:

typedef enum {test} t_test;
void test(int n) {}

Even with namespaces or test inside a class this fails.

Therefore my suggestion is to rename G4ApplicationState entries to:

enum G4ApplicationState
  {G4_PreInit, G4_Init, G4_Idle, G4_GeomClosed, G4_EventProc, G4_Quit, G4_Abort};

Ciao,
    Mario Schubert
---------------------------------------------
Beschleunigerlabor der LMU und TU München
Dipl. Phys. Mario Schubert
EMail: mario.schubert@physik.uni-muenchen.de
Phone: (+49 89)289 14283
FAX:   (+49 89)289 14280
Am Coulombwall 6, D-85748 Garching, Germany
Comment 1 Makoto.Asai 2002-08-30 11:58:59 CEST
Thank you for reporting this problem.
Change of the enumeration name is to be scheduled.
Comment 2 Makoto.Asai 2002-09-17 23:07:59 CEST
Problem is understood and fix is found. But fix must be done for
huge number of classes over all distribution code and thus
fix should be applied at the dedicated public release phase
in December.
Comment 3 Makoto.Asai 2002-12-05 10:49:59 CET
All modifications are committed to Geant4 5.0 release.