Hello
I use MinGW 4.8.2 and Qt IDE i tried to use gprof, I added the following flags

QMAKE_CXXFLAGS_DEBUG += -pg
QMAKE_LFLAGS_DEBUG += -pg 

to .pro file and extarcted the gmon.out file but i don't know how to convert it to a .txt file.

the document say

gprof options [executable-file [profile-data-files...]] [> outfile]

but i don't know how and where to do that :-D
that's what i wrote in CMD but failed.

C:\Qt\Tools\mingw482_32\bin\gprof C:\Users\name\Documents\QtCreator\Projects\build-Test-Desktop_Qt_5_3_MinGW_32bit-Debug\gmon.out>profile.txt

gpof EXECUTABLE-FILE gmon.out > outfile.txt

Your command line doesn't have the executable filename.

Which .exe file do you mean, gprof.exe or the project .exe?
could you please give methe full command

gprof.exe located at C:\Qt\Tools\mingw482_32\bin\
gmon.out at C:\Users\name\Documents\QtCreator\Projects\build-Test-Desktop_Qt_5_3_MinGW_32bit-Debug\
the project exe file(test.exe) located at C:\Users\name\Documents\QtCreator\Projects\build-Test-Desktop_Qt_5_3_MinGW_32bit-Debug\debug\

I tried this but still not work :(

C:\Qt\Tools\mingw482_32\bin\gprof C:\Users\name\Documents\QtCreator\Projects\build-Test-Desktop_Qt_5_3_MinGW_32bit-Debug\debug\test gmon.out>profile.txt

Try the full executable name. With the "exe"

C:\Qt\Tools\mingw482_32\bin\gprof C:\Users\name\Documents\QtCreator\Projects\build-Test-Desktop_Qt_5_3_MinGW_32bit-Debug\debug\test.exe gmon.out > profile.txt

You're entering this command in the MinGW command prompt, I assume.

I did that too.
MinGw command prompt? i don't think so. is there one?
that is really made me tired.

This article has been dead for over six months. Start a new discussion instead.