gcc -pg with OpenGL
Tim Prince
n8tm@aol.com
Fri Aug 21 14:39:00 GMT 2009
Armin Primadi wrote:
> I'm trying to profile my graphic program which uses OpenGL. The program
> worked correctly when I compile it without -pg flag. However, when I
> compile it using -pg flag, it doesn't work correctly (i.e., it doesn't
> read the obj file correctly, hence, doesn't display the image).
>
> Is there a known bug with the -pg flag with OpenGL? This is my first time
> using gprof and gcc -pg so I don't know if the bug is in my program or
> from the -pg flag.
>
The question doesn't entirely make sense as written. Do you have a
problem at link time (you must use gcc -pg for both compile and link,
and it will not help you with precompiled shared libraries), or do you
have a problem at run time?
Do you expect people to guess details such as your OS and gcc version?
In my recent experience, -pg breaks applications which are close to
address subspace limits. I haven't found any solution for that.
More information about the Gcc-help
mailing list