Message: Re: Compile differences between RedHat and Windows Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Compile differences between RedHat and Windows 

Keywords: Windows RedHat compile differences
Forum: User Requirements
Re: Question Compile differences between RedHat and Windows (Dennis Haggerty)
Date: 08 Apr, 2002
From: Gabriele Cosmo <Gabriele Cosmo>

Hi Dennis,

please note that this is not the correct forum for this topic.
The "Installation and Configuration" forum is more appropriate, here.

> After some modification of novice N03 I'm printing information out
> to a text file with the following statements: 
>  ////////////////////////////////////////////////
>  void ExN03SteppingVerbose::TrackingStarted()
>  ////////////////////////////////////////////////
>  {
>   ofstream outFile("outfile.txt",ios::app);

You need to specify the namespace for file streams.
i.e., the line above should look like the following:

   std::ofstream outFile("outfile.txt",std::ios::app);

> This compiles and works fine on my RedHat installation but when
> I take the exact same routines and compile them with my windows
> installation I get the following errors: 
>  :
> I obtained the pre-compiled windows build from the users workshop
> at SLAC and am able to compile and run the T01 tutorial on my
> windows installation so it seems like its installed correctly. 
> What am I missing? 
> I use the G4cout "method?" frequently to print informaiton to the
> screen. Is there a similiar "method?" to get that information into
> a text file? 

This happens because g++ does not enforce ISO/ANSI setup for
compilation, while VC++ on Windows does.
The fix above should solve your problem.

Cheers, Gabriele

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

 Add Message Add Message
to: "Re: Compile differences between RedHat and Windows"

 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 ]