Hello,
1) I am trying to run gprof on the following code snippet:

int fc()
{

 while (1);
 return 1;
}
int main ()

{
 fc ();
 return 1;
}

2) compile:
gcc -pg tmp.c

3) Execute
gprof -a a.out

4) Fails with the following error:
gmon.out: No such file or directory

Can someone help me generate gmon.out?
Thanks!

Start here

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.