I'm having trouble running gprof
on OS X. The file test.c
is:
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
and my terminal looks like:
$ gcc -pg test.c
$ gcc -pg -o test test.c
$ ./test
Hello, World!
$ gprof test
gprof: file: test is not of the host architecture
Edit: also, it doesn't generate the file gmon.out
.
What's going on here?