Hi again, so here is my updated question.
I ran codeblocks from a terminal call (in order to preserve all of the bash stuff, as mentioned earlier).
Is the best strategy for me to create a new project, and then plug in all the files as appropriately? If so what type of project should I create as there are quite a few of them.
My first step to get all this working is just to get the set of .c, .h, and makefiles to compile in codeblocks instead of terminal.
Two other things, I'm somewhat confused on the "porting of the makefile". Am I supposed to copy the text somewhere in codeblocks from my GNUmakefile?
Secondly, here is an example of what is bothering my program. Certain header files (that are defined by Geant are not being linked correctly. I feel that maybe the makefile is responsible, I did try linking on of the folders, and too my knowledge it was successful. For instance, I went into build options and linked the directory for #include "G4RunManager.hh". So what should I do to "link" the whole program?
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: exampleN01.cc,v 1.6 2006/06/29 17:47:10 gunter Exp $
// GEANT4 tag $Name: geant4-09-01-patch-02 $
//
//
// --------------------------------------------------------------
// GEANT 4 - exampleN01
// --------------------------------------------------------------
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#include "G4UItcsh.hh"
#include "ExN01DetectorConstruction.hh"
#include "ExN03PhysicsList.hh"
//#include "ExN01PrimaryGeneratorAction.hh"
#include "RadioPrimaryGeneratorAction.hh"
#include "ExN03SteppingVerbose.hh"
#include "RadioUserSteppingAction.hh"
#include "G4ios.hh"
#include <iostream.h>
#include <fstream.h>
#include "Randomize.hh"
#include <stdlib.h>
#include <cmath>
//More visualization definitions
#ifdef G4UI_USE_ROOT
#include "G4UIRoot.hh"
#endif
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE_XM
#include "G4UIXm.hh"
#endif
#ifdef G4UI_USE_WIN32
#include "G4UIWin32.hh"
#endif
#ifdef G4UI_USE_QT
#include "G4UIQt.hh"
#include "G4Qt.hh"
#include <qapplication.h>
#endif
int main(int argc,char** argv)
{
// Choose the Random engine
//
CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine);
// User Verbose output class
//
G4VSteppingVerbose::SetInstance(new ExN03SteppingVerbose);
// Construct the default run manager
//
G4RunManager* runManager = new G4RunManager;
// set mandatory initialization classes
//
G4VUserDetectorConstruction* detector = new ExN01DetectorConstruction;
runManager->SetUserInitialization(detector);
//
G4VUserPhysicsList* physics = new ExN03PhysicsList;
runManager->SetUserInitialization(physics);
// set mandatory user action class
//
//G4VUserPrimaryGeneratorAction* gen_action = new ExN01PrimaryGeneratorAction;
//runManager->SetUserAction(gen_action);
RadioPrimaryGeneratorAction* Radio_gen = new RadioPrimaryGeneratorAction;
G4VUserPrimaryGeneratorAction* gen_action = Radio_gen;
runManager->SetUserAction(gen_action);
RadioUserSteppingAction* radio = new RadioUserSteppingAction;
G4UserSteppingAction* radio_action = radio;
runManager->SetUserAction(radio_action);
// Initialize G4 kernel
//
runManager->Initialize();
// Get the pointer to the User Interface manager
//
G4UImanager* UI = G4UImanager::GetUIpointer();
if (argc!=1) // batch mode
{
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
}
else // interactive mode : define visualization UI terminal
{
#ifdef G4VIS_USE
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
#endif
G4UIsession* session = 0;
#if defined(G4UI_USE_TCSH)
session = new G4UIterminal(new G4UItcsh);
#elif defined(G4UI_USE_XM)
session = new G4UIXm(argc,argv);
UI->ApplyCommand("/control/execute visTutor/gui.mac");
#elif defined(G4UI_USE_WIN32)
session = new G4UIWin32();
UI->ApplyCommand("/control/execute visTutor/gui.mac");
#elif defined(G4UI_USE_QT)
session = new G4UIQt(argc,argv);
UI->ApplyCommand("/control/execute visTutor/gui.mac");
#else
session = new G4UIterminal();
#endif
UI->ApplyCommand("/control/execute vis.mac");
session->SessionStart();
delete session;
#ifdef G4VIS_USE
delete visManager;
#endif
}
// Job termination
// Free the store: user actions, physics_list and detector_description are
// owned and deleted by the run manager, so they should not
// be deleted in the main() program !
delete runManager;
return 0;
// Initialize G4 kernel
//
//runManager->Initialize();
// Get the pointer to the UI manager and set verbosities
//
//G4UImanager* UI = G4UImanager::GetUIpointer();
//UI->ApplyCommand("/run/verbose 1");
//UI->ApplyCommand("/event/verbose 1");
//UI->ApplyCommand("/tracking/verbose 1");
// Start a run
//
//G4int numberOfEvent = 3;
//runManager->BeamOn(numberOfEvent);
// Job termination
//
// Free the store: user actions, physics_list and detector_description are
// owned and deleted by the run manager, so they should not
// be deleted in the main() program !
//
//delete runManager;
//return 0;
}
Thank you,
JP