Message: Re: Trouble setting up sim based on example B1 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: Trouble setting up sim based on example B1 

Forum: Documentation and Examples
Re: Question Trouble setting up sim based on example B1 (Philip McGeachy)
Re: None Re: Trouble setting up sim based on example B1 (Ivana Hrivnacova)
Date: 31 Jan, 2013
From: Philip McGeachy <Philip McGeachy>

Thank you for your insight Ivana, it was quite helpful :). I am now running into another odd problem. I have created the Visual studio solution using cmake, however, when I open it in visual studio it does appear to have recognized that there was header files in the folder in which all the source code was taken for building the solution. In this case when I try to build an executable from this I get the following errors:

////////////////////////////////////////////////////////////////////

2>  PhilExample1.cc
2>..\geant4_9_5_p02\PhilMonoenergeticModel\PhilExample1.cc(31): fatal error C1083: Cannot open include file: 'PhilDetectorConstruction.hh': No such file or directory
2>  PhilDetectorConstruction.cc
2>..\geant4_9_5_p02\PhilMonoenergeticModel\src\PhilDetectorConstruction.cc(31): fatal error C1083: Cannot open include file: 'PhilDetectorConstruction.hh': No such file or directory
2>  PhilEventAction.cc
2>..\geant4_9_5_p02\PhilMonoenergeticModel\src\PhilEventAction.cc(31): fatal error C1083: Cannot open include file: 'PhilEventAction.hh': No such file or directory
2>  PhilPrimaryGeneratorAction.cc
2>..\geant4_9_5_p02\PhilMonoenergeticModel\src\PhilPrimaryGeneratorAction.cc(31): fatal error C1083: Cannot open include file: 'PhilPrimaryGeneratorAction.hh': No such file or directory
2>  PhilRunAction.cc
///////////////////////////////////////////////////////////////////////////////

which I assume is because it did not include the header files which I had placed in the source folder for the building of the solution. One thing I did notice was that the header files were written in visual studio C++ and I noticed that they ended with a '.h' whereas the CMakelists.txt which I copied from B1 says to include header files from "include" folder with ".hh". Perhaps this may be a possible cause for why these header files aren't getting included in the solution from the CMAKE building of the visual studio solution. If anyone has any input into this matter it would be greatly appreciated.

I have attached a couple of screen shots, one showing my visual c++ with no include folder on the left hand toolbar where I would expect it to be. And the other is the folder where I saved the header files.

Cheers,

P

On Thu, 31 Jan 2013 18:06:22 GMT, Ivana Hrivnacova wrote:

> The purpose of the *.in macros is explained in the Applicattion Developers Guide:
> http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ch10s02.html
> chapter 10.2.2.:
> "The exampleBN.in macros are also supposed to be run in a batch mode and their
> outputs from the Geant4 system testing are available in the files exampleBN.out."
> 
> The CMake configuration file is defined in such a way that the example can
> executed from the build directory, that's the macro files and for convenience 
> also the .out files are copied from the example source directory here.
> In your application, you should customize this block in your CMakeLists.txt:
> #----------------------------------------------------------------------------
> # Copy all scripts to the build directory, i.e. the directory in which we
> # build B1. This is so that we can run the executable directly because it
> # relies on these scripts being in the current working directory.
> #
> set(EXAMPLEB1_SCRIPTS
>   exampleB1.in
>   exampleB1.out
>   init.mac
>   init_vis.mac
>   run1.mac
>   run2.mac
>   vis.mac
>   )
> If you do not want this feature is your application you can simply remove this
> code from your CMake file.
> 
> Best regards,
>  

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/01/31/12.16-84548-header_files_included.JPG
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/01/31/12.16-54094-saved_header_files.JPG

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

1 None: Re: Trouble setting up sim based on example B1   (Ben Morgan - 31 Jan, 2013)
 Add Message Add Message
to: "Re: Trouble setting up sim based on example B1"

 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 ]