Message: Re: error linking linac example when it is modified to read iaea files Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: error linking linac example when it is modified to read iaea files 

Forum: Medical Applications
Re: None error linking linac example when it is modified to read iaea files (Balder)
Date: 04 Feb, 2014
From: Miguel Cortes-Giraldo <Miguel Cortes-Giraldo>

This is kind of strange... for some reason your PrimaryGeneratorAction class cannot "see" G4IAEAphspReader class.

I am not an expert with cmake, but I think this is the kind of error message which appears when one adds new files into a project which has already been compiled. Could you re-build and compile from scratch? I mean, could you just remove the "build" directory of your application, create a new "build" and call cmake as usual? It might work...

Please, let me know if this solves the problem.

Miguel

On Tue, 04 Feb 2014 14:30:58 GMT, artur wrote:

> Dear Geant4 users,
>  I am trying to read iaea files using the medical linac example modified in order to read iaea files. I have followed all the steps of the document How To (http://www-nds.iaea.org/phsp/phsp.htmlx), and the application is able to build 100% but when the code try to link with the executable the next message is shown:
> 
> [100%] Building CXX object
> CMakeFiles/ml2.dir/src/ML2PrimaryGenerationActionMessenger.cc.o
> 
> Linking CXX executable ml2
> CMakeFiles/ml2.dir/src/ML2PrimaryGenerationAction.cc.o: In function
> `CML2PrimaryGenerationAction::CML2PrimaryGenerationAction()':
> ML2PrimaryGenerationAction.cc:(.text+0x1a10): undefined reference to
> `G4IAEAphspReader::G4IAEAphspReader(G4String)'
> CMakeFiles/ml2.dir/src/ML2PrimaryGenerationAction.cc.o: In function
> `CML2PrimaryGenerationAction::CML2PrimaryGenerationAction()':
> ML2PrimaryGenerationAction.cc:(.text+0x1c58): undefined reference to
> `G4IAEAphspReader::G4IAEAphspReader(G4String)' collect2: ld returned 1
> exit status make[2]: *** [ml2] Error 1 make[1]: ***
> [CMakeFiles/ml2.dir/all] Error 2 make: *** [all] Error 2
> 
> I am using scientific linux and geant4 9.6. I have attached the
> PrimaryGeneratorAction.hh y .cc. Please, Could you advice me about this?
> PS: word file is my header (.hh) for the primary generator Many thanks,
> Balder.
> 
>    Attachment:
>             http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2014/02/04/06.20-65305-rimaryGenerationAction.cc
>       http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2014/02/04/06.25-88160-maryGenerationAction.docx
> 

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

1 Question: Re: error linking linac example when it is modified to read iaea files   (artur - 05 Feb, 2014)
1 Warning: Re: error linking linac example when it is modified to read iaea files   (Miguel Cortes-Giraldo - 05 Feb, 2014)
1 Agree: Re: error linking linac example when it is modified to read iaea files   (artur - 07 Feb, 2014)
2 None: Re: error linking linac example when it is modified to read iaea files   (heid - Mar 14, 03:19)
1 None: Re: error linking linac example when it is modified to read iaea files   (Miguel Cortes-Giraldo - Mar 19, 09:06)
... 3 Message(s)
 Add Message Add Message
to: "Re: error linking linac example when it is modified to read iaea files"

 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 ]