Problem 1281

Summary: Unresolved macro DLL_API in CLHEP/Vector/ThreeVector.h
Product: Geant4 Reporter: Yuriy <y.shitov>
Component: configAssignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: RESOLVED INVALID    
Severity: trivial    
Priority: P5    
Version: other   
Hardware: PC   
OS: Linux   

Description Yuriy 2012-01-24 12:51:57 CET
Windows-related macro DLL_API remains unresolved in the file mentioned leading to the following error:

rootcint -f neudetDict.cc -c -I../include -I../include/NeuDetG4    -I/home/hep/shitov/local/arch64/root/5.33.01/include  -I/home/hep/shitov/local/arch64/vgm/pro/packages/VGM/include -I/home/hep/shitov/local/arch64/vgm/pro/packages/BaseVGM/include -I/home/hep/shitov/local/arch64/vgm/pro/packages/Geant4GM/include -I/home/hep/shitov/local/arch64/vgm/pro/packages/RootGM/include -I/home/hep/shitov/local/arch64/vgm/pro/packages/XmlVGM/include -DG4_9_5 -DG4_9_2 -DG4_VER_9  -I/home/hep/shitov/snemo/geant4/4.9.5_x64/include/Geant4 -DG4DEBUG -DG4VERBOSE -DG4_STORE_TRAJECTORY -DG4USE_STL -DG4VIS_USE -DG4VIS_BUILD_OPENGLX_DRIVER -DG4VIS_USE_OPENGLX -DG4UI_USE_TCSH  -I/home/hep/shitov/local/arch64/nd/NeuDetEvent/pro/include  -I/home/hep/shitov/local/arch64/nd/NeuDetGeom/pro/include  -I/home/hep/shitov/local/arch64/nd/TDGen/pro/include  -I/home/hep/shitov/local/arch64/gsl/1.15/include  -I/home/hep/shitov/local/arch64/nd/VerGen/pro/include  -I/home/hep/shitov/local/arch64/nd/NemoTools/pro/include  -I/home/hep/shitov/local/arch64/clhep/pro/include  ../include/NeuDetG4/PrimaryParticle.hh ../include/NeuDetG4/RootEvent.hh ../include/NeuDetG4/neudetg4LinkDef.h

Error: Symbol DLL_API static double tolerance is not defined in current scope  /home/hep/shitov/snemo/geant4/4.9.5_x64/include/Geant4/CLHEP/Vector/ThreeVector.h:399:
Error: Symbol DLL_API const Hep3Vector HepXHat,HepYHat,HepZHat is not defined in current scope  /home/hep/shitov/snemo/geant4/4.9.5_x64/include/Geant4/CLHEP/Vector/ThreeVector.h:424:

after removing of this symbol compilation works well

System info:
Linux heppc229.hep.ph.ic.ac.uk 2.6.18-274.12.1.el5 #1 SMP Tue Nov 29 13:37:46 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[shitov@heppc229 pro]$ gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)
Comment 1 Gabriele Cosmo 2012-01-24 15:20:49 CET
The DLL_API macro is correctly set to be empty for systems other than Windows.
To note that the -internal- CLHEP module in release 9.5 is -exclusive-, it means that it should be used only if the build of the Geant4 libraries have been instructed to do so -in place- of the external CLHEP library, and the final application is built coherently with it.
It appears that your application (through ROOT/cint ?!) is wrongly picking up headers from the internal CLHEP module and mixing them with an external CLHEP installation on your system (/home/hep/shitov/local/arch64/clhep/pro/include).