Message: syntax error while compiling a program Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question syntax error while compiling a program 

Keywords: error in int main while compiling a code
Forum: Documentation and Examples
Date: 14 Sep, 2004
From: Ivan Sinopoli <ivan.sinopoli@email.it>

hi to all,

i'm trying to build my own program in G4 with this modules:

-radpro.cc (main) -radproGeometry.cc (.hh) -radproPatientParametrisation.cc (.hh) -radproPhysicsList.c (.hh) -radproPrimaryGeneratorAction.cc (.hh)

now, before continuing to build the program, i want to check if this code is able to read my phantom data. I've compiled this but i get some warning and one error:

Making dependency for file radpro.cc...
Making dependency for file src/radproVisManager.cc ...
Making dependency for file src/radproPrimaryGeneratorAction.cc ...
Making dependency for file src/radproPhysicsList.cc ...
Making dependency for file src/radproPatientParameterisation.cc ...
Making dependency for file src/radproGeometry.cc ...
Compiling radproGeometry.cc ...
In file included from src/radproGeometry.cc:23:
/home/geant4.6.1/source/geometry/management/include/G4VPVParameterisation.hh:102: warning: `
   virtual void G4VPVParameterisation::ComputeDimensions(G4Orb&, int, const
   G4VPhysicalVolume*) const' was hidden
include/radproPatientParameterisation.hh:74: warning:   by `virtual void
   radproPatientParameterisation::ComputeDimensions(G4Hype&, int, const
   G4VPhysicalVolume*) const'
/home/geant4.6.1/source/geometry/management/include/G4VPVParameterisation.hh:114: warning: `
   virtual void G4VPVParameterisation::ComputeDimensions(G4Polycone&, int,
   const G4VPhysicalVolume*) const' was hidden
include/radproPatientParameterisation.hh:74: warning:   by `virtual void
   radproPatientParameterisation::ComputeDimensions(G4Hype&, int, const
   G4VPhysicalVolume*) const'
/home/geant4.6.1/source/geometry/management/include/G4VPVParameterisation.hh:118: warning: `
   virtual void G4VPVParameterisation::ComputeDimensions(G4Polyhedra&, int,
   const G4VPhysicalVolume*) const' was hidden
include/radproPatientParameterisation.hh:74: warning:   by `virtual void
   radproPatientParameterisation::ComputeDimensions(G4Hype&, int, const
   G4VPhysicalVolume*) const'
src/radproGeometry.cc: In member function `void
   radproGeometry::InitialisationOfMaterials()':
src/radproGeometry.cc:120: warning: unused variable `G4Material*defaultMaterial
   '
Compiling radproPatientParameterisation.cc ...
In file included from src/radproPatientParameterisation.cc:9:
/home/geant4.6.1/source/geometry/management/include/G4VPVParameterisation.hh:102: warning: `
   virtual void G4VPVParameterisation::ComputeDimensions(G4Orb&, int, const
   G4VPhysicalVolume*) const' was hidden
include/radproPatientParameterisation.hh:74: warning:   by `virtual void
   radproPatientParameterisation::ComputeDimensions(G4Hype&, int, const
   G4VPhysicalVolume*) const'
/home/geant4.6.1/source/geometry/management/include/G4VPVParameterisation.hh:114: warning: `
   virtual void G4VPVParameterisation::ComputeDimensions(G4Polycone&, int,
   const G4VPhysicalVolume*) const' was hidden
include/radproPatientParameterisation.hh:74: warning:   by `virtual void
   radproPatientParameterisation::ComputeDimensions(G4Hype&, int, const
   G4VPhysicalVolume*) const'
/home/geant4.6.1/source/geometry/management/include/G4VPVParameterisation.hh:118: warning: `
   virtual void G4VPVParameterisation::ComputeDimensions(G4Polyhedra&, int,
   const G4VPhysicalVolume*) const' was hidden
include/radproPatientParameterisation.hh:74: warning:   by `virtual void
   radproPatientParameterisation::ComputeDimensions(G4Hype&, int, const
   G4VPhysicalVolume*) const'
Compiling radproPhysicsList.cc ...
Compiling radproPrimaryGeneratorAction.cc ...
Compiling radproVisManager.cc ...

and this is the error:

Compiling radpro.cc ... radpro.cc: In function `int main(int, char**)': radpro.cc:24: error: syntax error before `)' token

gmake: *** [/home/sinopoli/geant4/tmp/Linux-g++/radpro/exe/radpro.o] Error 1

this error seems very strange to me...i've checked the code but all seem ok, however this is the line quote by error message:

#include "radproPrimaryGeneratorAction.hh"
#include "radproGeometry.hh"
#include "G4UIterminal.hh"
#include "G4UImanager.hh"
#include "G4RunManager.hh"
#include "G4UItcsh.hh"
#include "G4ios.hh"
#include <fstream>

#ifdef G4VIS_USE
#include "radproVisManager.hh"
#endif
using namespace std;

int main(int argc, char** argv)

{

how can i solve this problem? Thanks in advance to all!

Bye

Ivan Sinopoli

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

 Add Message Add Message
to: "syntax error while compiling a program"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]