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

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



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"  ???

Cheers,
Sergio

---
http://biorobotics.fi-p.unam.mx
--
"Meine Hoffnung soll mich leiten
Durch die Tage ohne Dich
Und die Liebe soll mich tragen
Wenn der Schmerz die Hoffnung bricht"



Reply to: