Subject: Can't compile with profiling...
To: None <netbsd-help@NetBSD.ORG>
From: Jonathan Belson <jon@dookie.demon.co.uk>
List: netbsd-help
Date: 10/26/1997 18:47:56
Hiya

I've been trying to compile a piece of code with profiling enabled...
Compilation of each file with the -pg option goes fine, but when I
link I get an error about the symbol __DYNAMIC being undefined.

gcc  -o vector main.o display.o object.o rock.o real.o --verbose -pg
-lstdc++ -lm -L/usr/local/X11R6.1/lib -lX11 -lXext -lSM -lICE
gcc version 2.7.2
 ld -e start -dc -dp -o vector /usr/lib/gcrt0.o
-L/usr/local/X11R6.1/lib -L/usr/libexec main.o display.o object.o
rock.o real.o -lstdc++ -lm -lX11 -lXext -lSM -lICE -lgcc -lc_p -lgcc

I checked out the ld and ld.so man pages which explained what the
DYNAMIC symbol did, but gave no information as regard to profiling.

Am I doing something wrong, is my installation broken or (shudder)
does gcc not support profiling of C++ code?

Regards,
Jon