[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: C, math.h and globals



On Tue, Mar 11, 2003 at 04:07:37PM +0100, Sebastiaan wrote:
> On Tue, 11 Mar 2003, Colin Watson wrote:
> > On Tue, Mar 11, 2003 at 01:40:49PM +0100, Vincent Lefevre wrote:
> > > It won't be defined in the header, but the corresponding symbol will
> > > still be defined in the library itself. Won't this be a problem when
> > > linking?
> >
> > It links fine, but if you link with -lm (not the default) then it seems
> > you can get segfaults at run-time.
> 
> Then what is the default? I always use 'gcc -lm' when using the math
> library.

Er, -lm is obviously adding an additional library to the default (only
libc).

BTW, please do not send me private copies of list mail.

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: