Problem 570

Summary: There is a main function in the HepRep library !!!!
Product: Geant4 Reporter: barrand
Component: visualizationAssignee: perl
Status: RESOLVED FIXED    
Severity: normal CC: perl
Priority: P2    
Version: other   
Hardware: All   
OS: Other   

Description barrand 2004-01-26 01:31:27 CET
I have reconstructed the version 6.0 on MacOSX (10.3) (in fact tag geant4-06-00).
 When building examples the linker says that "main" exists in two places !!!

  In fact, there is a "main" function in the HepRep library !!!
(A library is not an application)

  The culprit file is :
     visualization/HepRep/src/appendzip.cc

  It appears that the MacOSX linker takes the "main" of the examples, but well, it is really seeking
problems to have some main functions in a library...
Comment 1 perl 2004-03-03 23:56:59 CET
Mark Donszelmann has posted the following solution.  Please advise if this
solves the problem for you.

In versions 4.6.0 and 4.6.0.p01 libHepRep.a inadvertently contains a main()
routine. The problem is either signaled by the linker or shows up when you run
an example and it will tell you something like:

Usage: .... <zipfile>

To resolve the problem, remove the appendzip.cc file from the libHepRep library
by following the instructions below:

cd geant4directory/source/visualization/HepRep
rm src/appendzip.cc
make clean
make
cd geant4directory
Comment 2 Gabriele Cosmo 2004-03-31 03:00:59 CEST
Fixed in release 6.1.