using gprof with mingw Gfortran

Brooks Moses brooks.moses@codesourcery.com
Tue Nov 7 20:37:00 GMT 2006


Vivek Rao wrote:
> Using mingw gfortran gcc version 4.3.0 20061021 on
> Windows XP, I have created an executable with
> 
> gfortran -pg a.f90 b.f90
> 
> and run the a.exe executable a.out to create a
> gmon.out file. When I run
> 
> gprof gmon.out 
> 
> using GNU gprof 2.16.93 I get the output
> 
> gprof: gmon.out: not in executable format 
> 
> Does gprof work with mingw gfortran?

What happens if you try "gprof a.exe gmon.out" instead?  Your error 
message sounds like mingw gprof doesn't know to default to a.exe rather 
than a.out for the executable file name, and so when it doesn't find an 
a.out file, it's expecting the first argument to be the executable.

- Brooks



More information about the Fortran mailing list