Subject: Re: Can't compile with profiling...
To: None <jon@dookie.demon.co.uk>
From: Mike Long <mikel@shore.net>
List: netbsd-help
Date: 10/27/1997 21:29:19
>Date: Sun, 26 Oct 1997 18:47:56
>From: Jonathan Belson <jon@dookie.demon.co.uk>

>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

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

Use gcc to link the binary, instead of trying to use ld directly.
-- 
Mike Long <mikel@shore.net>                http://www.shore.net/~mikel
"Every normal man must be tempted at times to spit on his hands,
hoist the black flag, and begin slitting throats." -- H.L. Mencken