Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: s79 on January 16, 2007, 02:37:23 pm

Title: Trables with gprof
Post by: s79 on January 16, 2007, 02:37:23 pm
I compile this code
Code
#include <stdlib.h>
void a(void);
void b();

int main()
{
a();
b();
return 0;
}

void a(void)
{
    _sleep(200);
    return;
}
void b()
{
    int i;
    for(i=1;i<10;i++)
    {
        a();
    }
}
build with command

mingw32-g++.exe -Wall -pg -g  -ID:\Utils\Lang\MinGW\include  -c main.c -o obj\Debug\main.o
mingw32-g++.exe -LD:\Utils\Lang\MinGW\lib  -o .\TestGProf.exe obj\Debug\main.o   -pg -lgmon 

run plug-in "Code profiler" and get only:

File `G:\Project\TestGProf\gmon.out' (version 0) contains:
   1 histogram record
   3 call-graph records
   0 basic-block count records

other windows blank.
What's wrong?
Title: Re: Trables with gprof
Post by: TDragon on January 16, 2007, 03:44:36 pm
Did you forget "Execute TestGProf.exe"?
Title: Re: Trables with gprof
Post by: s79 on January 17, 2007, 12:40:55 pm
Yes.
I think troubles with MinGW? but not understand whatever.