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

Re: C++: Math function round() does not compile - why?



On Tue, 2006-02-14 at 09:40 -0600, Sergio Cuéllar Valdés wrote:
> 2006/2/14, Oliver Elphick <olly@lfix.co.uk>:
> > I am trying to use the math function round() according to the manpage,
> > but it does not compile.  Can anyone explain why not, please?
> > The command line and error are:
> >
> > g++-2.95 -c -pipe -DQWS -fexceptions -fno-rtti -Wall -W -g -std=c99 -I/opt/Qtopia/include -o orderimpl.o orderimpl.cpp
> > orderimpl.cpp: In method `void OrderImpl::calculate_line(int)':
> > orderimpl.cpp:84: implicit declaration of function `int round(...)'
> 
> 
> Hi,
> 
> hmmm, have you tried to add the "-lm"  ???

i was thinking the same, but it looks as though he is only compiling,
not linking, so one would think that '-lm' would have no impact.

-matt zagrabelny



Reply to: