Advertisement

profiling code with g++

Started by April 07, 2002 06:01 AM
0 comments, last by flame_warrior 22 years, 5 months ago
Hey, I add the -pg option so I could profile my code, but after compiling and running the program I don''t get any gmon.out file. Everytime I run gprof it says no gmon.out file. Is there some other option I need to add after the -pg ? Thank you.
Hello from my world
The online manual points out that you must use -pg both at compile and link time.



[Questions (STFW) | GDNet Start Here | GDNet Search | Forum FAQ | Google | Asking Smart Questions ]
[Docs (RTFM) | MSDN | SGI''s STL | OpenGL | File formats]
[C++ Must Haves (RTFS) | MinGW | Boost | Loki | FLTK | SDL ]

Stolen from Magmai Kai Holmlor, who held it from Oluseyi, who was inspired by Kylotan...
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

This topic is closed to new replies.

Advertisement