Problem 570 - There is a main function in the HepRep library !!!!
Summary: There is a main function in the HepRep library !!!!
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: visualization (show other problems)
Version: other
Hardware: All Other
: P2 normal
Assignee: perl
URL:
Depends on:
Blocks:
 
Reported: 2004-01-26 01:31 CET by barrand
Modified: 2004-03-31 03:00 CEST (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 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.