我在OS X上运行gprof
时遇到了麻烦。文件test.c
如下:
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
我的终端看起来像这样:
$ gcc -pg test.c
$ gcc -pg -o test test.c
$ ./test
Hello, World!
$ gprof test
gprof: file: test is not of the host architecture
编辑:此外,它也不会生成gmon.out
文件。
这里出了什么问题?